Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Add private_key() helper#27

Merged
djc merged 3 commits intomainfrom
private-key-helper
Sep 8, 2023
Merged

Add private_key() helper#27
djc merged 3 commits intomainfrom
private-key-helper

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
@djc djc force-pushed the private-key-helper branch from 36cc680 to a0030ce Compare September 8, 2023 09:34
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
@cpu cpu deleted the private-key-helper branch September 8, 2023 12:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants