Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Java 1.5, 1.6
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      When I was working on PDF-130, I was running the tagging on the calgary transit 2004 PDF, using Java 1.5, and it worked just fine. When I switched to using Java 1.6, I got an exception related to loading Bouncy Castle.

      This might be due to changes to the reflection code that I made for PDF-127, where I changed the SecurityManager reflection code to not happen in the constructor, but instead happen statically. That change should be investigated.

      Also, I noticed that Java 1.6 includes a Sun JCE provider, whereas Java 1.5 does not. This could indicate a conflict between BouncyCastle and the Sun JCE provider. Possibly a newer version of BouncyCastle may address any conflict.

      We should see if BouncyCastle is even necessary with Java 1.6. Potentially we may need it for its RC4 implementation.

        Activity

        Mark Collette created issue -
        Hide
        Mark Collette added a comment -

        Actually, Sun's 1.5 JVM and up include a JCE provider, and it even has RC4 support. So BouncyCastle might not be necessary anymore.
        http://java.sun.com/j2se/1.5.0/docs/guide/security/jce/JCERefGuide.html#SupportRSAEncryption

        I'll need to check-out the Mac JVM and see about its JCE provider.

        Show
        Mark Collette added a comment - Actually, Sun's 1.5 JVM and up include a JCE provider, and it even has RC4 support. So BouncyCastle might not be necessary anymore. http://java.sun.com/j2se/1.5.0/docs/guide/security/jce/JCERefGuide.html#SupportRSAEncryption I'll need to check-out the Mac JVM and see about its JCE provider.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20315 Thu Jan 21 11:01:44 MST 2010 mark.collette PDF-136 : Problem using BouncyCastle with Java 1.6
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/security/SecurityManager.java
        Hide
        Mark Collette added a comment -

        It looks like the original problem was due to IDE classpath issues.

        But, I did investigate the actual need for BouncyCastle, now that we're only running on Java 1.5+, and found that with the Sun 1.5 and 1.6 JVMs on Windows, and the Mac 1.5 JVM on OS X 10.5, they already have functioning JCE providers that give us RC4, so it's not necessary anymore.

        With BouncyCastle not necessary any more, I've changed the code to not exception when it's not found. It will still log a warning for now. In the future that might change to being a fine log level.

        Should update any docs that mention library dependencies.

        Subversion 20315
        icepdf\core\src\org\icepdf\core\pobjects\security\SecurityManager.java

        Show
        Mark Collette added a comment - It looks like the original problem was due to IDE classpath issues. But, I did investigate the actual need for BouncyCastle, now that we're only running on Java 1.5+, and found that with the Sun 1.5 and 1.6 JVMs on Windows, and the Mac 1.5 JVM on OS X 10.5, they already have functioning JCE providers that give us RC4, so it's not necessary anymore. With BouncyCastle not necessary any more, I've changed the code to not exception when it's not found. It will still log a warning for now. In the future that might change to being a fine log level. Should update any docs that mention library dependencies. Subversion 20315 icepdf\core\src\org\icepdf\core\pobjects\security\SecurityManager.java
        Mark Collette made changes -
        Field Original Value New Value
        Summary Problem using BouncyCastle with Java 1.6 BouncyCastle unnecessary
        Environment Java 1.6 Java 1.5, 1.6
        Salesforce Case []
        Fix Version/s 4.0 [ 10222 ]
        Affects [Documentation (User Guide, Ref. Guide, etc.)]
        Assignee Patrick Corless [ patrick.corless ] Mark Collette [ mark.collette ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20356 Mon Jan 25 07:46:19 MST 2010 patrick.corless PDF-136 removed bouncy castle jars from libs folder, and class path of viewer jar.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/build.xml
        Commit graph DEL /icepdf/trunk/icepdf/lib/bcprov-jdk15.jar
        Commit graph MODIFY /icepdf/trunk/icepdf/examples/etc/build-common.xml
        Patrick Corless made changes -
        Assignee Mark Collette [ mark.collette ] Patrick Corless [ patrick.corless ]
        Hide
        Patrick Corless added a comment -

        Removing the bouncy castle jars from the build scripts. Mark can you make sure that the securityManager's warning is more specific to the bouncy castle provider stead of the generic warning message.

        Show
        Patrick Corless added a comment - Removing the bouncy castle jars from the build scripts. Mark can you make sure that the securityManager's warning is more specific to the bouncy castle provider stead of the generic warning message.
        Patrick Corless made changes -
        Assignee Patrick Corless [ patrick.corless ] Mark Collette [ mark.collette ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20360 Mon Jan 25 13:08:24 MST 2010 mark.collette PDF-136 : BouncyCastle unnecessary
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/security/SecurityManager.java
        Hide
        Mark Collette added a comment -

        Reworded the messages to be more specific to bouncy castle, and to emphasise that it is optional, while lowering the log level as well.

        Subversion 20360

        Show
        Mark Collette added a comment - Reworded the messages to be more specific to bouncy castle, and to emphasise that it is optional, while lowering the log level as well. Subversion 20360
        Patrick Corless made changes -
        Assignee Mark Collette [ mark.collette ] Patrick Corless [ patrick.corless ]
        Hide
        Patrick Corless added a comment -

        Removed the bouncy jars from the bundles as well as the the wiki pages. The jars can still be used but the JDK comes with the needed crypto implementations.

        Show
        Patrick Corless added a comment - Removed the bouncy jars from the bundles as well as the the wiki pages. The jars can still be used but the JDK comes with the needed crypto implementations.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: