File tree Expand file tree Collapse file tree 3 files changed +16
-12
lines changed
src/rust/cryptography-x509-verification/src/policy Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ Changelog
12
12
not be empty.
13
13
* Added support for timestamp extraction to the
14
14
:class: `~cryptography.fernet.MultiFernet ` class.
15
+ * Relax the Authority Key Identifier requirements on root CA certificates
16
+ during X.509 verification to allow fields permitted by :rfc: `5280 ` but
17
+ forbidden by the CA/Browser BRs.
15
18
16
19
.. _v43-0-0 :
17
20
Original file line number Diff line number Diff line change @@ -412,18 +412,13 @@ pub(crate) mod ca {
412
412
) ) ;
413
413
}
414
414
415
- // authorityCertIssuer and authorityCertSerialNumber MUST NOT be present.
416
- if aki. authority_cert_issuer . is_some ( ) {
417
- return Err ( ValidationError :: Other (
418
- "authorityKeyIdentifier must not contain authorityCertIssuer" . to_string ( ) ,
419
- ) ) ;
420
- }
421
-
422
- if aki. authority_cert_serial_number . is_some ( ) {
423
- return Err ( ValidationError :: Other (
424
- "authorityKeyIdentifier must not contain authorityCertSerialNumber" . to_string ( ) ,
425
- ) ) ;
426
- }
415
+ // NOTE: CABF 7.1.2.1.3 says that Root CAs MUST NOT
416
+ // have authorityCertIdentifier or authorityCertSerialNumber,
417
+ // but these are present in practice in trust program bundles
418
+ // due to older roots that have been grandfathered in.
419
+ // Other validators are permissive of these being present,
420
+ // so we don't check for them.
421
+ // See #11461 for more information.
427
422
}
428
423
429
424
Ok ( ( ) )
Original file line number Diff line number Diff line change 67
67
# forbidden under CABF. This is consistent with what
68
68
# Go's crypto/x509 and Rust's webpki crate do.
69
69
"webpki::aki::root-with-aki-ski-mismatch" ,
70
+ # We allow root CAs where the AKI contains fields other than keyIdentifier,
71
+ # which is technically forbidden under CABF. No other implementations
72
+ # enforce this requirement.
73
+ "webpki::aki::root-with-aki-authoritycertissuer" ,
74
+ "webpki::aki::root-with-aki-authoritycertserialnumber" ,
75
+ "webpki::aki::root-with-aki-all-fields" ,
70
76
# We allow RSA keys that aren't divisible by 8, which is technically
71
77
# forbidden under CABF. No other implementation checks this either.
72
78
"webpki::forbidden-rsa-not-divisable-by-8-in-root" ,
You can’t perform that action at this time.
0 commit comments