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

Feature request: Extend PEM parsing to support additional formats #49

Open
wiedem opened this issue Dec 22, 2023 · 1 comment
Open

Feature request: Extend PEM parsing to support additional formats #49

wiedem opened this issue Dec 22, 2023 · 1 comment

Comments

@wiedem
Copy link

wiedem commented Dec 22, 2023

The PEM parsing and generation implemented in PEMDocument doesn't fully support the PEM format as defined in RFC1421.

In particular, fields such as Proc-Type and DEK-INFO are not supported, which means that formats as defined in RFC5915 cannot be processed:

-----BEGIN EC PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,A4E9C3555C149C675E03B622A42500D2

<snip>
-----END EC PRIVATE KEY-----

It would be advantageous if the processing of these additional fields were supported by the PEMDocument, as otherwise some PEM files cannot be processed properly.

@Lukasa
Copy link
Collaborator

Lukasa commented Dec 24, 2023

Yeah this is totally an existing limitation. I believe we designed the type such that extending it for this use-case was possible, but the core feature set didn’t require it. We’d welcome a PR to add the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants