From a2048ecde51beaacafaff9f251664a786a341a2e Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 19 Jul 2021 08:44:07 +0200 Subject: [PATCH] BIMI: log certificates --- app/src/main/java/eu/faircode/email/Bimi.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Bimi.java b/app/src/main/java/eu/faircode/email/Bimi.java index 41c98c6334..2b598f0a1b 100644 --- a/app/src/main/java/eu/faircode/email/Bimi.java +++ b/app/src/main/java/eu/faircode/email/Bimi.java @@ -189,7 +189,14 @@ public class Bimi { CertificateFactory fact = CertificateFactory.getInstance("X.509"); for (PemObject pem : pems) { ByteArrayInputStream bis = new ByteArrayInputStream(pem.getContent()); - certs.add((X509Certificate) fact.generateCertificate(bis)); + X509Certificate cert = (X509Certificate) fact.generateCertificate(bis); + Log.i("BIMI cert" + + " serial=" + cert.getSerialNumber() + + " issuer=" + cert.getIssuerDN() + + " subject=" + cert.getSubjectDN() + + " not before=" + cert.getNotBefore() + + " not after=" + cert.getNotAfter()); + certs.add(cert); } // Get first certificate