mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 02:44:21 +02:00
Fix fullchain parsing for CRLF chains (#7877)
Fixes #7875 . After [this comment](https://github.com/certbot/certbot/issues/7875#issuecomment-608145208) and evaluating the options, I opted to go with `stricttextualmsg`, as required by RFC 8555. Reasoning is that the ACME v1 code path (via OpenSSL) produces a `fullchain_pem` which satisfies `stricttextualmsg`, so we don't need to be more generous than that. One downside of the `re` approach is that it doesn't seem capable of capturing repeating group matches. As a result, it matches each certificate individually, silently passing over any data in between the encapsulation boundaries, such as explanatory text, which is prohibited by RFC 8555. It would be ideal to raise an error when encountering such a non-conformant chain, but we'd need to create a mini-parser to do it, I think. * Fix fullchain parsing for CRLF chains. fullchain parsing now works in two passes: 1. A first pass which is generous with what it accepts - basically preeb(CERTIFICATE)+anything+posteb(CERTIFICATE). This determines the boundaries for each certificate. 2. A second pass which normalizes (by parsing and re-encoding) each certificate found in the first pass. * typo in docstring * remove redundant group in regex * can't use assertRaisesRegex until py27 is gone
This commit is contained in:
@@ -28,6 +28,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
||||
* Fix hanging OCSP queries during revocation checking - added a 10 second timeout.
|
||||
* Standalone servers now have a default socket timeout of 30 seconds, fixing
|
||||
cases where an idle connection can cause the standalone plugin to hang.
|
||||
* Parsing of the RFC 8555 application/pem-certificate-chain now tolerates CRLF line
|
||||
endings. This should fix interoperability with Buypass' services.
|
||||
|
||||
More details about these changes can be found on our GitHub repo.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user