Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce newline on cert body/chain before destination uploads? #3685

Closed
havron opened this issue Jul 16, 2021 · 2 comments
Closed

Enforce newline on cert body/chain before destination uploads? #3685

havron opened this issue Jul 16, 2021 · 2 comments

Comments

@havron
Copy link
Contributor

havron commented Jul 16, 2021

👋 I noticed that some https servers expect a newline at the end of the cert body and chain when terminating TLS (e.g., golang; older example with kubernetes nginx ingress). The relevant RFC seems to indicate parsers need to handle different newline conventions:

Furthermore, parsers SHOULD ignore whitespace and other non-
base64 characters and MUST handle different newline conventions.

One server failed for me after retrieving a cert from a Lemur destination upload because it thought our PEM block was malformed due to concatenating the domain cert and chain without newlines, and skipped over it. We realized we had introduced the bug ourselves in parsing, however, so not sure how big of an issue this is.

I added a patch in havron@76b1bb7; is there interest in a PR to enforce this for all certs? I wasn't sure what an appropriate way to test this would be, since we'd maybe want to mock a server loading the certs with+without newlines.

@hosseinsh
Copy link
Contributor

Hey Sam, thanks for sharing this with us. Honestly, we haven't experienced any issues with the current destinations we use, and I am not sure what would break, if we change the newline. We can keep an eye out, if this should become needed.

@havron
Copy link
Contributor Author

havron commented Aug 3, 2021

Sounds good to me, thanks! I'll close this for now :)

@havron havron closed this as completed Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants