Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4699745

Exception parsing PKCS#12 file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.1
    • security-libs
    • None

      Trying to load the attached PKCS12 file produces an exception with the following stack trace (on a current Hopper build with an unobfuscated JSSE version):

      Exception in thread "main" java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.
      at sun.security.util.DerInputStream.getLength(DerInputStream.java:502)
      at sun.security.util.DerInputStream.getLength(DerInputStream.java:476)
      at sun.security.util.DerValue.<init>(DerValue.java:233)
      at sun.security.util.DerInputStream.readVector(DerInputStream.java:331)
      at sun.security.util.DerInputStream.getSequence(DerInputStream.java:261)
      at com.sun.net.ssl.internal.ssl.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:635)
      at java.security.KeyStore.load(KeyStore.java:652)
      at Test.main(Test.java:11)

      The PKCS#12 file was produced using the IAIK toolkit and uses indefinite length BER encoding. Apparently our ASN.1 code has trouble understanding that file. This problem occurs in Hopper as well as Merlin FCS.

            smalkanisunw Seema Malkani (Inactive)
            andreas Andreas Sterbenz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: