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: add additional fields for PEM output #39

Open
KEINOS opened this issue Apr 29, 2024 · 1 comment
Open

Feature: add additional fields for PEM output #39

KEINOS opened this issue Apr 29, 2024 · 1 comment

Comments

@KEINOS
Copy link
Owner

KEINOS commented Apr 29, 2024

Currently, exporting the generated Key object in PEM format supports the least fields by default.

For the future usage (such as ECDH support, #37), PEM key may require additional fields. Context or protocol versions for example.

- func (k *Key) PEM() (string, error)
+ func (k *Key) PEM[T string|int](optField ...[string]T) (string, error)
@KEINOS
Copy link
Owner Author

KEINOS commented May 4, 2024

We need to be careful implementing this.

Including custom fields (headers) to PEM is easy, but reading the PEM file and generate a new Key object will not include those customized fields.

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

1 participant