1
0
Fork 1

Catch and log anything coming out of DANE

(cherry picked from commit 222db63123d1621f7612e1f2dbc5713381e7e982)
This commit is contained in:
Stephen Paul Weber 2023-11-08 13:06:26 -05:00 committed by 12aw
parent 8603fa3747
commit 8cd75ab575

View file

@ -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);