提交 5c7eb1c5 编写于 作者: J juh

8025287: NPE in api/java_security/cert/PKIXRevocationChecker/GeneralTests_GeneralTests

Reviewed-by: mullan
上级 0cd70877
...@@ -307,7 +307,7 @@ class RevocationChecker extends PKIXRevocationChecker { ...@@ -307,7 +307,7 @@ class RevocationChecker extends PKIXRevocationChecker {
: anchor.getCAPublicKey(); : anchor.getCAPublicKey();
} }
crlSignFlag = true; crlSignFlag = true;
if (params.certPath() != null) { if (params != null && params.certPath() != null) {
certIndex = params.certPath().getCertificates().size() - 1; certIndex = params.certPath().getCertificates().size() - 1;
} else { } else {
certIndex = -1; certIndex = -1;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/** /**
* @test * @test
* @bug 6854712 7171570 8010748 * @bug 6854712 7171570 8010748 8025287
* @summary Basic unit test for PKIXRevocationChecker * @summary Basic unit test for PKIXRevocationChecker
*/ */
...@@ -44,6 +44,8 @@ public class UnitTest { ...@@ -44,6 +44,8 @@ public class UnitTest {
CertPathChecker cpc = cpv.getRevocationChecker(); CertPathChecker cpc = cpv.getRevocationChecker();
PKIXRevocationChecker prc = (PKIXRevocationChecker)cpc; PKIXRevocationChecker prc = (PKIXRevocationChecker)cpc;
prc.init(false);
System.out.println("Testing that get methods return null or " + System.out.println("Testing that get methods return null or " +
"empty lists/sets/maps"); "empty lists/sets/maps");
requireNull(prc.getOcspResponder(), "getOcspResponder()"); requireNull(prc.getOcspResponder(), "getOcspResponder()");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册