BIMI: check root domain certificate

This commit is contained in:
M66B 2022-06-07 07:39:41 +02:00
parent e9eadcc8ac
commit 8700031bbb
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}