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

CertPath/CertPathValidatorTest/KeyParamsInheritanceTest fails with NullPointerException

    Details

    • Subcomponent:
    • Resolved In Build:
      b58
    • CPU:
      x86
    • OS:
      linux
    • Verification:
      Verified

      Description

      There is a sqe test named CertPath/CertPathValidatorTest/KeyParamsInheritanceTest fails even after the fix for 7187962 is integrated:

      Test CertPath/CertPathValidatorTest/KeyParamsInheritanceTest fails for NullPointerException:
      Testing : failure builder test: initial trusted key has no params: forward
      java.lang.NullPointerException


       Testing : failure builder test: initial trusted key has no params: reverse
      java.lang.NullPointerException

      The fix for 7187962 solves the certpath validator issue, but looks like there is still regression with certpath builder.
      Exception StackTrace:
      java.lang.NullPointerException
              at sun.security.pkcs11.P11DSAKeyFactory.implTranslatePublicKey(P11DSAKey
      Factory.java:57)
              at sun.security.pkcs11.P11KeyFactory.engineTranslateKey(P11KeyFactory.ja
      va:127)
              at sun.security.pkcs11.P11KeyFactory.convertKey(P11KeyFactory.java:64)
              at sun.security.pkcs11.P11Signature.engineInitVerify(P11Signature.java:3
      78)
              at java.security.Signature$Delegate.init(Signature.java:1103)
              at java.security.Signature$Delegate.chooseProvider(Signature.java:1066)
              at java.security.Signature$Delegate.engineInitVerify(Signature.java:1121
      )
              at java.security.Signature.initVerify(Signature.java:451)
              at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:440)
              at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:394)
              at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:394)
              at sun.security.provider.certpath.ReverseBuilder.verifyCert(ReverseBuild
      er.java:516)
              at sun.security.provider.certpath.SunCertPathBuilder.depthFirstSearchRev
      erse(SunCertPathBuilder.java:668)
              at sun.security.provider.certpath.SunCertPathBuilder.buildReverse(SunCer
      tPathBuilder.java:252)
              at sun.security.provider.certpath.SunCertPathBuilder.buildCertPath(SunCe
      rtPathBuilder.java:167)
              at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBu
      ilder.java:136)
              at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCert
      PathBuilder.java:131)
              at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
              at BuildCertPath.doBuild(BuildCertPath.java:397)
              at KeyParamsInheritanceTest.builderTestFailure(KeyParamsInheritanceTest.
      java:621)
              at KeyParamsInheritanceTest.doBuilderTests(KeyParamsInheritanceTest.java
      :560)
              at KeyParamsInheritanceTest.doTest(KeyParamsInheritanceTest.java:198)
              at KeyParamsInheritanceTest.runTest(KeyParamsInheritanceTest.java:144)
              at KeyParamsInheritanceTest.main(KeyParamsInheritanceTest.java:127)

        Issue Links

          Activity

          Hide
          mullan Sean Mullan added a comment -
          BT2:EVALUATION

          We need to make similar changes as were made for 7187962 for CertPathBuilder but in this case we should skip (not use) any TrustAnchors that contain a DSA PublicKey with no params when building a CertPath. Changes have to be made to both forward and reverse mode.
          Show
          mullan Sean Mullan added a comment - BT2:EVALUATION We need to make similar changes as were made for 7187962 for CertPathBuilder but in this case we should skip (not use) any TrustAnchors that contain a DSA PublicKey with no params when building a CertPath. Changes have to be made to both forward and reverse mode.
          Hide
          mullan Sean Mullan added a comment -
          BT2:SUGGESTED FIX

          Changeset: 17881ebf811c
          Author: mullan
          Date: 2012-09-16 13:29 -0700
          URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/17881ebf811c

          7195409: CertPath/CertPathValidatorTest/KeyParamsInheritanceTest fails with NullPointerException
          Reviewed-by: xuelei

          ! src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java
          ! src/share/classes/sun/security/provider/certpath/BasicChecker.java
          ! src/share/classes/sun/security/provider/certpath/ForwardBuilder.java
          ! src/share/classes/sun/security/provider/certpath/ForwardState.java
          ! src/share/classes/sun/security/provider/certpath/PKIX.java
          ! src/share/classes/sun/security/provider/certpath/ReverseState.java
          ! src/share/classes/sun/security/provider/certpath/RevocationChecker.java
          ! src/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java
          Show
          mullan Sean Mullan added a comment - BT2:SUGGESTED FIX Changeset: 17881ebf811c Author: mullan Date: 2012-09-16 13:29 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/17881ebf811c 7195409: CertPath/CertPathValidatorTest/KeyParamsInheritanceTest fails with NullPointerException Reviewed-by: xuelei ! src/share/classes/sun/security/provider/certpath/AlgorithmChecker.java ! src/share/classes/sun/security/provider/certpath/BasicChecker.java ! src/share/classes/sun/security/provider/certpath/ForwardBuilder.java ! src/share/classes/sun/security/provider/certpath/ForwardState.java ! src/share/classes/sun/security/provider/certpath/PKIX.java ! src/share/classes/sun/security/provider/certpath/ReverseState.java ! src/share/classes/sun/security/provider/certpath/RevocationChecker.java ! src/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk8/build/jdk/rev/17881ebf811c
          User: katleman
          Date: 2012-09-27 06:14:08 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/build/jdk/rev/17881ebf811c User: katleman Date: 2012-09-27 06:14:08 +0000

            People

            • Assignee:
              mullan Sean Mullan
              Reporter:
              yulixu Vivian Xu (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: