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

Remove Bouncy Castle Provider Reference

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.9, 1.8.10, 2.0.0
    • Fix Version/s: 2.0.7, 3.0.0 PDFBox
    • Component/s: Crypto, PDModel
    • Labels:
      None

      Description

      PDFBox Versions 1.8.X and 2.0.X add Bouncy Castle as a security provider explicitly (Hard coded)

      Referencing bouncy castle explicitly ties PDF box to a specific provider implementation.

      Instead of referencing BouncyCastleProvider explicitly provide an option to select another provider or alternatively allow a way to override the default.

      Version 1.8.X:
      https://github.com/apache/pdfbox/blob/1.8.10/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandlersManager.java

      public static SecurityHandlersManager getInstance()
          {
              if(instance == null)
              {
                  instance = new SecurityHandlersManager();
                  Security.addProvider(new BouncyCastleProvider());
              }
              return instance;
          }
      

      Version 2.0.0:

      https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandlerFactory.java

         static
          {
              Security.addProvider(new BouncyCastleProvider());
          }
      

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              johnny.minty Johnny Minty

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment