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

Reviewed-by: mullan
This commit is contained in:
Jason Uh 2013-10-22 11:57:38 -07:00
parent d2d0153dd6
commit c6ac4eb557
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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()");