Skip to content

Commit 998ac4e

Browse files
authored
Ignore unhandled critical extensions for mark certificates (#162)
* Set IGNORECRITCAL flag when evaluating mark certificates * Add a to the issue in the comments --------- Co-authored-by: Sean Whalen <seanthegeek@users.noreply.github.com>
1 parent 8b10470 commit 998ac4e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

checkdmarc/bimi.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
X509Store,
3232
X509StoreContext,
3333
X509,
34+
X509StoreFlags,
3435
X509StoreContextError,
3536
)
3637

@@ -61,7 +62,10 @@
6162

6263
# Load the certificates included in MVACAs.pem into a certificate store
6364
X509STORE = X509Store()
64-
65+
# Do not consider certificate invalid if a certificate extension marked critical
66+
# by the issuer cannot be processed by OpenSSL.
67+
# https://github.com/domainaware/checkdmarc/issues/161
68+
X509STORE.set_flags(X509StoreFlags.IGNORE_CRITICAL)
6569
path = str(files(checkdmarc.resources).joinpath("MVACAs.pem"))
6670
CA_PEMS = pem.parse_file(path)
6771
for CA_PEM in CA_PEMS:

0 commit comments

Comments
 (0)