Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1456

wasted work in PublicKeySecurityHandler.prepareForDecryption()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Labels:

      Description

      The problem appears in version 1.7.1 and in revision 1414743. I
      attached a one-line patch that fixes it. This problem and the
      attached patch are similar the previously fixed PDFBOX-1447 and its
      patch.

      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".

        Attachments

        1. patch.diff
          0.7 kB
          Adrian Nistor

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              adriannistor Adrian Nistor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: