Merge "Change verifyServerDomainAndCertificates to pass in a hostname." into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
74a550fac7
@@ -168,7 +168,13 @@ public class CertificateChainValidator {
|
||||
}
|
||||
|
||||
try {
|
||||
SSLParametersImpl.getDefaultTrustManager().checkServerTrusted(chain, authType);
|
||||
X509TrustManager x509TrustManager = SSLParametersImpl.getDefaultTrustManager();
|
||||
if (x509TrustManager instanceof TrustManagerImpl) {
|
||||
TrustManagerImpl trustManager = (TrustManagerImpl) x509TrustManager;
|
||||
trustManager.checkServerTrusted(chain, authType, domain);
|
||||
} else {
|
||||
x509TrustManager.checkServerTrusted(chain, authType);
|
||||
}
|
||||
return null; // No errors.
|
||||
} catch (GeneralSecurityException e) {
|
||||
if (HttpLog.LOGV) {
|
||||
|
||||
Reference in New Issue
Block a user