Catch and log anything coming out of DANE
(cherry picked from commit 222db63123d1621f7612e1f2dbc5713381e7e982)
This commit is contained in:
parent
8603fa3747
commit
8cd75ab575
1 changed files with 10 additions and 3 deletions
|
@ -372,9 +372,16 @@ public class MemorizingTrustManager {
|
|||
LOGGER.log(Level.FINE, "checkCertTrusted: trying appTrustManager");
|
||||
if (isServer) {
|
||||
if (verifiedHostname != null) {
|
||||
if (daneVerifier.verifyCertificateChain(chain, verifiedHostname, port)) {
|
||||
if (daneCb != null) daneCb.accept(true);
|
||||
return;
|
||||
try {
|
||||
if (daneVerifier.verifyCertificateChain(chain, verifiedHostname, port)) {
|
||||
if (daneCb != null) daneCb.accept(true);
|
||||
return;
|
||||
}
|
||||
} catch (final CertificateException e) {
|
||||
Log.d(Config.LOGTAG, "checkCertTrusted DANE failure: " + e);
|
||||
throw e;
|
||||
} catch (final Exception e) {
|
||||
Log.d(Config.LOGTAG, "checkCertTrusted DANE related failure: " + e);
|
||||
}
|
||||
}
|
||||
appTrustManager.checkServerTrusted(chain, authType);
|
||||
|
|
Loading…
Add table
Reference in a new issue