Andre Mariano wrote
> Well, I'm trying to sign my PDF with a TSA Client, my problem is that it
> throws some header errors like those:
>
> Exception in thread "main" java.lang.IllegalArgumentException: Illegal
> character(s) in message header value: Basic
> Y29udHJlbF9jb25zdHJ1Y29lczpvOWF3ODlkb2xhOW9seXM5MzdoMHlwMDN5NG4yN3RkeTQ5cHkw
> cHM=
I hope you are aware you just posted authentication information for
"contrel_construcoes" with password "o9aw..." Otherwise you should change
your credentials unless the server is internal and the authentication
unnecessary after all.
This been said, you found a bug, authorization information is added like
this in TSAClientBouncyCastle.getTSAResponse to the request:
tsaConnection.setRequestProperty("Authorization", "Basic "
+ Base64.encodeBytes(userPassword.getBytes()));
Unfortunately Base64.encodeBytes by default adds a line break after 76
characters. That's why you have that line break between "Hkw" and "o9a"
which is not a legal character in a message header value.
A different overload of Base64.encodeBytes should be used here which allows
to give the option DONT_BREAK_LINES.
Regards, Michael
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/Problems-with-iText-Timestamp-signature-tp4658673p4658677.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
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