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

Private key parsing fails with zerossl header #317

Open
Menduist opened this issue Sep 25, 2022 · 4 comments
Open

Private key parsing fails with zerossl header #317

Menduist opened this issue Sep 25, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Menduist
Copy link
Contributor

zerossl provides files like this:

-----BEGIN RSA PRIVATE KEY-----
[the private key]
-----END RSA PRIVATE KEY-----

But at parsing, we only support BEGIN PRIVATE KEY:

if item.name == "PRIVATE KEY":

@cheatfate
Copy link
Collaborator

This is not some parsing error, chronos do not have support for PKCS#1 PEM format.

@Menduist
Copy link
Contributor Author

Weird, by just replacing with "PRIVATE KEY" in the key file it seemed to work

@cheatfate
Copy link
Collaborator

Its not that simple, when you put BEGIN PRIVATE KEY it means that binary representation could have RSA or EC-NIST private key inside. It is part of PKCS#8 standard and type of key is encoded in binary form. While BEGIN RSA PRIVATE KEY could/should have just simple binary encoded RSA private key.

@cheatfate
Copy link
Collaborator

Also there is such usage as BEGIN EC PRIVATE KEY...

@cheatfate cheatfate added the enhancement New feature or request label Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants