On Tue, 02 Jul 2013 12:57:42 +0200, mkl <m...@wir-sind-cool.org> wrote:

> A different overload of Base64.encodeBytes should be used here which  
> allows
> to give the option DONT_BREAK_LINES.

Something like this:

Log: Fixed bug in TSAClientBouncyCastle: lines may not be broken when  
encoding a password to Base64 (reported by Michael Klink).
Files:  
trunk/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClientBouncyCastle.java

DIFF: https://sourceforge.net/p/itext/code/5883/

Modified:  
trunk/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClientBouncyCastle.java
===================================================================
---  
trunk/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClientBouncyCastle.java
     2013-07-01  
13:04:24 UTC (rev 5882)
+++  
trunk/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClientBouncyCastle.java
     2013-07-02  
11:08:59 UTC (rev 5883)
@@ -243,7 +243,7 @@
          if ((tsaUsername != null) && !tsaUsername.equals("") ) {
              String userPassword = tsaUsername + ":" + tsaPassword;
              tsaConnection.setRequestProperty("Authorization", "Basic " +
-                Base64.encodeBytes(userPassword.getBytes()));
+                Base64.encodeBytes(userPassword.getBytes(),  
Base64.DONT_BREAK_LINES));
          }
          OutputStream out = tsaConnection.getOutputStream();
          out.write(requestBytes);

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to