mirror of https://github.com/M66B/FairEmail.git
BIMI: check root domain certificate
This commit is contained in:
parent
e9eadcc8ac
commit
8700031bbb
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue