mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-25 13:04:05 +00:00
7018897: CertPath validation cannot handle self-signed cert with bad KeyUsage
Remove KeyUsage checking for trust anchors Reviewed-by: mullan
This commit is contained in:
parent
32b8c54ea3
commit
ce7292003a
@ -231,13 +231,6 @@ public class PKIXCertPathValidator extends CertPathValidatorSpi {
|
||||
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());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user