提交 99c4526f 编写于 作者: X xuelei

7018897: CertPath validation cannot handle self-signed cert with bad KeyUsage

Summary: Remove KeyUsage checking for trust anchors
Reviewed-by: mullan
上级 44655d8d
......@@ -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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册