mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-05 12:24:26 +01:00
BIMI: check root domain certificate
This commit is contained in:
@@ -222,9 +222,11 @@ public class Bimi {
|
||||
|
||||
// Check subject
|
||||
boolean found = false;
|
||||
String root = UriHelper.getRootDomain(context, domain);
|
||||
List<String> names = EntityCertificate.getDnsNames(cert);
|
||||
for (String name : names)
|
||||
if (domain.endsWith(name.toLowerCase(Locale.ROOT))) {
|
||||
if (root != null &&
|
||||
root.equalsIgnoreCase(UriHelper.getRootDomain(context, name))) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user