Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f743e54f authored by Geremy Condra's avatar Geremy Condra
Browse files

Change verifyServerDomainAndCertificates to pass in a hostname.

This is required for cert pinning.

Change-Id: I16041f17e97d9ae592a2b809f6a8164268338d1b
parent 4f8da32f
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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) {