提交 b61df498 编写于 作者: V valeriep

Merge

......@@ -276,39 +276,33 @@ public abstract class SSLContextImpl extends SSLContextSpi {
supportedCipherSuiteList = getApplicableCipherSuiteList(
getSuportedProtocolList(), false);
}
}
return supportedCipherSuiteList;
return supportedCipherSuiteList;
}
}
// Get default CipherSuiteList.
CipherSuiteList getDefaultCipherSuiteList(boolean roleIsServer) {
if (roleIsServer) {
// The maintenance of cipher suites needs to be synchronized.
synchronized (this) {
// Clear cache of available ciphersuites.
clearAvailableCache();
// The maintenance of cipher suites needs to be synchronized.
synchronized (this) {
// Clear cache of available ciphersuites.
clearAvailableCache();
if (roleIsServer) {
if (defaultServerCipherSuiteList == null) {
defaultServerCipherSuiteList = getApplicableCipherSuiteList(
getDefaultProtocolList(true), true);
}
}
return defaultServerCipherSuiteList;
} else {
// The maintenance of cipher suites needs to be synchronized
synchronized (this) {
// Clear cache of available ciphersuites.
clearAvailableCache();
return defaultServerCipherSuiteList;
} else {
if (defaultClientCipherSuiteList == null) {
defaultClientCipherSuiteList = getApplicableCipherSuiteList(
getDefaultProtocolList(false), true);
}
}
return defaultClientCipherSuiteList;
return defaultClientCipherSuiteList;
}
}
}
......
......@@ -311,7 +311,7 @@ public final class SimpleValidator extends Validator {
// if the certificate is self-issued, ignore the pathLenConstraint
// checking.
if (!X509CertImpl.isSelfIssued(cert)) {
if (maxPathLen <= 1) { // reserved one for end-entity certificate
if (maxPathLen <= 0) {
throw new ValidatorException("Violated path length constraints",
ValidatorException.T_CA_EXTENSIONS, cert);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册