tls: load all CRLs from a PEM bundle - #65577
Conversation
|
Review requested:
|
06781d7 to
d20618d
Compare
AddCRL() read a single PEM block and returned, so a crl option holding several concatenated CRLs only ever got its first entry into the store. Any certificate whose issuer's CRL came later in the bundle then failed with UNABLE_TO_GET_CRL. Read in a loop until the BIO is exhausted, the way AddCACertificates() right above it already does for ca bundles. Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
d20618d to
9db73ed
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65577 +/- ##
=======================================
Coverage 90.07% 90.08%
=======================================
Files 751 751
Lines 254875 254882 +7
Branches 48115 48113 -2
=======================================
+ Hits 229586 229600 +14
+ Misses 16467 16463 -4
+ Partials 8822 8819 -3
🚀 New features to boost your workflow:
|
Return false unless the read loop ran to the end of the BIO, so a bundle holding an unparseable CRL throws instead of quietly applying only the entries that were read. Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
pimterry
left a comment
There was a problem hiding this comment.
LGTM.
There is a question on whether this should be semver major that others might want to chime in on: before, loading a CRL bundle where the first CRL was valid but others were broken was successful - now it fails if any CRLs in the bundle can't be loaded.
Personally I think it's reasonable as a bug fix - you clearly want to load the CRLs and not doing so was a silent error before - but I could be persuaded if anybody else feels strongly.
|
The red on |
AddCRL()read a single PEM block and returned, so acrloption holding several concatenated CRLs only ever got its first entry into the store. Any certificate whose issuer's CRL came later in the bundle then failed withUNABLE_TO_GET_CRL.Read in a loop until the BIO is exhausted, the way
AddCACertificates()right above it already does forcabundles.Fixes: #65576