Validate BIMI certificates

This commit is contained in:
M66B
2021-07-14 17:42:22 +02:00
parent d15322120f
commit 7a476d777d
6 changed files with 175 additions and 29 deletions

View File

@@ -835,7 +835,7 @@ public class EmailProvider implements Parcelable {
Certificate[] certs = sslSocket.getSession().getPeerCertificates();
for (Certificate cert : certs)
if (cert instanceof X509Certificate) {
List<String> names = ConnectionHelper.getDnsNames((X509Certificate) cert);
List<String> names = EntityCertificate.getDnsNames((X509Certificate) cert);
EntityLog.log(context, "Certificate " + address +
" " + TextUtils.join(",", names));
if (ConnectionHelper.matches(host, names)) {