diff --git a/src/share/classes/sun/security/provider/certpath/RevocationChecker.java b/src/share/classes/sun/security/provider/certpath/RevocationChecker.java index 0aad090a8b05241f9330d87836000807b27c9b2b..f34e737102a4ff755acbfde70f49946fd8223908 100644 --- a/src/share/classes/sun/security/provider/certpath/RevocationChecker.java +++ b/src/share/classes/sun/security/provider/certpath/RevocationChecker.java @@ -307,7 +307,7 @@ class RevocationChecker extends PKIXRevocationChecker { : anchor.getCAPublicKey(); } crlSignFlag = true; - if (params.certPath() != null) { + if (params != null && params.certPath() != null) { certIndex = params.certPath().getCertificates().size() - 1; } else { certIndex = -1; diff --git a/test/java/security/cert/PKIXRevocationChecker/UnitTest.java b/test/java/security/cert/PKIXRevocationChecker/UnitTest.java index 5c5f5bcfcf0aded74203bfc192950402e11c1936..8ddfda2429a9af56789687645834a24f3b4f6778 100644 --- a/test/java/security/cert/PKIXRevocationChecker/UnitTest.java +++ b/test/java/security/cert/PKIXRevocationChecker/UnitTest.java @@ -23,7 +23,7 @@ /** * @test - * @bug 6854712 7171570 8010748 + * @bug 6854712 7171570 8010748 8025287 * @summary Basic unit test for PKIXRevocationChecker */ @@ -44,6 +44,8 @@ public class UnitTest { CertPathChecker cpc = cpv.getRevocationChecker(); PKIXRevocationChecker prc = (PKIXRevocationChecker)cpc; + prc.init(false); + System.out.println("Testing that get methods return null or " + "empty lists/sets/maps"); requireNull(prc.getOcspResponder(), "getOcspResponder()");