7018897: CertPath validation cannot handle self-signed cert with bad KeyUsage
authorxuelei
Mon, 14 Feb 2011 13:31:13 -0800
changeset 8395 29afb3ec47e2
parent 8394 49215a09f282
child 8396 587947f96036
7018897: CertPath validation cannot handle self-signed cert with bad KeyUsage Summary: Remove KeyUsage checking for trust anchors Reviewed-by: mullan
jdk/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java
--- a/jdk/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java	Mon Feb 14 11:00:02 2011 -0800
+++ b/jdk/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java	Mon Feb 14 13:31:13 2011 -0800
@@ -231,13 +231,6 @@
         AdaptableX509CertSelector issuerSelector =
                         new AdaptableX509CertSelector();
 
-        // check trusted certificate's key usage
-        boolean[] usages = trustedCert.getKeyUsage();
-        if (usages != null) {
-            usages[5] = true;    // keyCertSign
-            issuerSelector.setKeyUsage(usages);
-        }
-
         // check trusted certificate's subject
         issuerSelector.setSubject(firstCert.getIssuerX500Principal());