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

Remove Bouncy Castle Provider Reference

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.9, 1.8.10, 2.0.0
    • 2.0.7, 3.0.0 PDFBox
    • Crypto, PDModel
    • 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

              lehmi Andreas Lehmkühler
              johnny.minty Johnny Minty
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: