mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 10:47:28 +00:00
BIMI: check root domain certificate
This commit is contained in:
parent
e9eadcc8ac
commit
8700031bbb
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue