提交 b61df498 编写于 作者: V valeriep

Merge

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