You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Miro (Jira)" <ji...@apache.org> on 2021/05/07 08:45:00 UTC
[jira] [Updated] (PDFBOX-5187) TSAClient with username+password
[ https://issues.apache.org/jira/browse/PDFBOX-5187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Miro updated PDFBOX-5187:
-------------------------
Description:
TSAClient used for signing document has authentication to TSA server implemented "weirdly". There is:
_{{connection.setRequestProperty(username, password);}}_
... and it should be:
_{{connection.setRequestProperty("Authorization", "Basic " + new String(Base64.getEncoder().encode((username + ":" + password).getBytes(StandardCharsets.UTF_8))));}}_
(in case of basic authentication ofc.)
was:
TSAClient used for signing document has authentication to TSA server implemented "weirdly". There is:
_{{connection.setRequestProperty(username, password);}}_
... and it should be:
_{{connection.setRequestProperty("Authorization", "Basic " + new String(Base64.getEncoder().encode(auth.getBytes(StandardCharsets.UTF_8))));}}_
(in case of basic authentication ofc.)
> TSAClient with username+password
> --------------------------------
>
> Key: PDFBOX-5187
> URL: https://issues.apache.org/jira/browse/PDFBOX-5187
> Project: PDFBox
> Issue Type: Bug
> Components: Signing
> Reporter: Miro
> Priority: Minor
>
> TSAClient used for signing document has authentication to TSA server implemented "weirdly". There is:
> _{{connection.setRequestProperty(username, password);}}_
> ... and it should be:
> _{{connection.setRequestProperty("Authorization", "Basic " + new String(Base64.getEncoder().encode((username + ":" + password).getBytes(StandardCharsets.UTF_8))));}}_
> (in case of basic authentication ofc.)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org