mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 08:08:16 +02:00
Show certificate information / quick setup
This commit is contained in:
@@ -143,6 +143,19 @@ public class EntityCertificate {
|
||||
}
|
||||
}
|
||||
|
||||
static String getKeyFingerprint(X509Certificate certificate) {
|
||||
if (certificate == null)
|
||||
return null;
|
||||
try {
|
||||
String keyId = getKeyId(certificate);
|
||||
String fingerPrint = getFingerprintSha1(certificate);
|
||||
return fingerPrint + (keyId == null ? "" : "/" + keyId);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static String getSubject(X509Certificate certificate) {
|
||||
return certificate.getSubjectX500Principal().getName(X500Principal.RFC2253);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user