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

REGRESSION: JarEntry.getCertificates incorrectly returns null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • core-libs

      FULL PRODUCT VERSION :
      java version "1.5.0_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP Service Pack1

      A DESCRIPTION OF THE PROBLEM :
      JarEntry.getCertificates() is returning null for a class file iwhen a valid certificate exists. The same test on JDK 1.3 and JDK 1.4 returns the certificate from the jar file.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      The attachment to the Jira bug DERBY-553 at Apache Derby has the code to reproduce the problem.

      http://issues.apache.org/jira/browse/DERBY-553

      Attachment: cert15_repro.jar

      Unjar and follow the README.txt

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      For just (jdk142)

      java -cp . cert15 file:dcl_emc2s.jar

      Entry: META-INF/EMCCTO.SF
        no certificates
      Entry: META-INF/EMCCTO.DSA
        no certificates
      Entry: META-INF/
        no certificates
      Entry: article/
        no certificates
      Entry: article/release.txt
      1 certificates
        [
      [
        Version: V1
        Subject: CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
        Signature Algorithm: SHA1withDSA, OID = 1.2.840.10040.4.3

        Key: IBMJCE DSA Public Key:
      1369357455684227651099409138014984629173887494125957258336670286186212859602995
      4417945383834221707472511153942143233305201210772956708316837732015570095623732
      8506597177247015828958873371906623219045221495693320553318427620135136893603481
      231771972765428767912357849162321695586848491978028631172699284428192

        Validity: [Wrom: NHGSWZIDREXCAXZOWCONEUQZAAFXI
                     To: Wed Nov 30 08:05:04 PST 2005]
        Issuer: CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
        SerialNumber: [1125590704]

      ]
        Algorithm: [SHA1withDSA]
        Signature:
      0000: 30 2c 02 14 03 4b d5 61 c8 af 78 d3 88 a3 12 02 0....K.a..x.....
      0010: ac 96 72 42 09 da 5f e8 02 14 13 9d 79 02 46 8d ..rB........y.F.
      0020: 2f 96 49 86 a1 f0 cf e5 a4 8b 81 8e 1f e9 ..I...........

      ]
      Entry: emc.java
      1 certificates
        [
      [
        Version: V1
        Subject: CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
        Signature Algorithm: SHA1withDSA, OID = 1.2.840.10040.4.3

        Key: IBMJCE DSA Public Key:
      1369357455684227651099409138014984629173887494125957258336670286186212859602995
      4417945383834221707472511153942143233305201210772956708316837732015570095623732
      8506597177247015828958873371906623219045221495693320553318427620135136893603481
      231771972765428767912357849162321695586848491978028631172699284428192

        Validity: [Wrom: SHJEXXIMQZUIVOTQNQEMSFDULHPQQ
                     To: Wed Nov 30 08:05:04 PST 2005]
        Issuer: CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
        SerialNumber: [1125590704]

      ]
        Algorithm: [SHA1withDSA]
        Signature:
      0000: 30 2c 02 14 03 4b d5 61 c8 af 78 d3 88 a3 12 02 0....K.a..x.....
      0010: ac 96 72 42 09 da 5f e8 02 14 13 9d 79 02 46 8d ..rB........y.F.
      0020: 2f 96 49 86 a1 f0 cf e5 a4 8b 81 8e 1f e9 ..I...........

      ]
      Entry: org/
        no certificates
      Entry: org/apache/
        no certificates
      Entry: org/apache/derbyTesting/
        no certificates
      Entry: org/apache/derbyTesting/databaseclassloader/
        no certificates
      Entry: org/apache/derbyTesting/databaseclassloader/emc.class
      1 certificates
        [
      [
        Version: V1
        Subject: CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
        Signature Algorithm: SHA1withDSA, OID = 1.2.840.10040.4.3

        Key: IBMJCE DSA Public Key:
      1369357455684227651099409138014984629173887494125957258336670286186212859602995
      4417945383834221707472511153942143233305201210772956708316837732015570095623732
      8506597177247015828958873371906623219045221495693320553318427620135136893603481
      231771972765428767912357849162321695586848491978028631172699284428192

        Validity: [Wrom: WOYIYZUNNYCGPKYLEJGDGVCJVTLBX
                     To: Wed Nov 30 08:05:04 PST 2005]
        Issuer: CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
        SerialNumber: [1125590704]

      ]
        Algorithm: [SHA1withDSA]
        Signature:
      0000: 30 2c 02 14 03 4b d5 61 c8 af 78 d3 88 a3 12 02 0....K.a..x.....
      0010: ac 96 72 42 09 da 5f e8 02 14 13 9d 79 02 46 8d ..rB........y.F.
      0020: 2f 96 49 86 a1 f0 cf e5 a4 8b 81 8e 1f e9 ..I...........

      ]
      Entry: org/apache/derbyTesting/databaseclassloader/graduate.txt
      1 certificates
        [
      [
        Version: V1
        Subject: CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
        Signature Algorithm: SHA1withDSA, OID = 1.2.840.10040.4.3

        Key: IBMJCE DSA Public Key:
      1369357455684227651099409138014984629173887494125957258336670286186212859602995
      4417945383834221707472511153942143233305201210772956708316837732015570095623732
      8506597177247015828958873371906623219045221495693320553318427620135136893603481
      231771972765428767912357849162321695586848491978028631172699284428192

        Validity: [Wrom: FGGMEPYOQKEDOTWFAOBUZXUWLSZLK
                     To: Wed Nov 30 08:05:04 PST 2005]
        Issuer: CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
        SerialNumber: [1125590704]

      ]
        Algorithm: [SHA1withDSA]
        Signature:
      0000: 30 2c 02 14 03 4b d5 61 c8 af 78 d3 88 a3 12 02 0....K.a..x.....
      0010: ac 96 72 42 09 da 5f e8 02 14 13 9d 79 02 46 8d ..rB........y.F.
      0020: 2f 96 49 86 a1 f0 cf e5 a4 8b 81 8e 1f e9 ..I...........



      ACTUAL -
      For just (jdk1.5)

      java -cp . cert15 file:dcl_emc2s.jar

      Entry: META-INF/EMCCTO.SF
        no certificates
      Entry: META-INF/EMCCTO.DSA
        no certificates
      Entry: META-INF/
        no certificates
      Entry: article/
        no certificates
      Entry: article/release.txt
        no certificates
      Entry: emc.java
        no certificates
      Entry: org/
        no certificates
      Entry: org/apache/
        no certificates
      Entry: org/apache/derbyTesting/
        no certificates
      Entry: org/apache/derbyTesting/databaseclassloader/
        no certificates
      Entry: org/apache/derbyTesting/databaseclassloader/emc.class
        no certificates
      Entry: org/apache/derbyTesting/databaseclassloader/graduate.txt
        no certificates

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      http://issues.apache.org/jira/browse/DERBY-553

      Attachment: cert15_repro.jar
      ---------- END SOURCE ----------

      Release Regression From : 1.4.2_10
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

            vinnie Vincent Ryan
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: