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

Raise usage error when parsing empty certificate #4822

Open
goatgoose opened this issue Oct 4, 2024 · 0 comments
Open

Raise usage error when parsing empty certificate #4822

goatgoose opened this issue Oct 4, 2024 · 0 comments

Comments

@goatgoose
Copy link
Contributor

goatgoose commented Oct 4, 2024

Problem:

Currently, s2n-tls will raise an internal error when parsing an empty certificate like the following:

-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----

This occurs when the s2n-tls PEM parser is invoked, in functions like s2n_cert_chain_and_key_load_pem().

Solution:

s2n-tls should instead return a usage error with a more helpful error message. We should also make sure that similar parsing issues result in usage errors.

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