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

Add private_key() helper #27

Merged
merged 3 commits into from
Sep 8, 2023
Merged

Add private_key() helper #27

merged 3 commits into from
Sep 8, 2023

Conversation

djc
Copy link
Member

@djc djc commented Sep 8, 2023

private_key() yields the first private key of whatever type as a Result<Option<PrivateKeyDer<'static>>, io::Error>. This is useful across a lot of code (including test code) where the code generally doesn't care (or want to know) which type of private key is needed, and only one private key is necessary (usually for building a server config).

@djc djc requested review from cpu and ctz September 8, 2023 09:33
Copy link
Member

@cpu cpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea 👍 Thanks

@djc djc merged commit c82537e into main Sep 8, 2023
16 checks passed
@cpu cpu deleted the private-key-helper branch September 8, 2023 12:39
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

Successfully merging this pull request may close these issues.

3 participants