[
https://issues.apache.org/jira/browse/PDFBOX-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adrian Nistor updated PDFBOX-1456:
----------------------------------
Attachment: patch.diff
patch
> wasted work in PublicKeySecurityHandler.prepareForDecryption()
> --------------------------------------------------------------
>
> Key: PDFBOX-1456
> URL: https://issues.apache.org/jira/browse/PDFBOX-1456
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 1.7.1
> Reporter: Adrian Nistor
> Labels: patch, performance
> Attachments: patch.diff
>
>
> The problem appears in version 1.7.1 and in revision 1414743. I
> attached a one-line patch that fixes it.
> In method "PublicKeySecurityHandler.prepareForDecryption", the loop
> over "recipCertificatesIt" should break immediately after
> "foundRecipient" is set to "true" and "envelopedData" is set to
> "ri.getContent(...)". All the iterations after "foundRecipient" is
> set to "true" do not perform any useful work because the "if"
> statement depends on "!foundRecipient".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira