Skip to content

pkcs8: add hint on private_key field about its format (#1749) #1751

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

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

Daaiid
Copy link
Contributor

@Daaiid Daaiid commented Apr 8, 2025

Adds a hint that might have prevented #1749.

The different formats of the private key per algorithm is already mentioned in the struct documentation and the referenced RFC also documents this fact.

Here we add a breadcrumb inline on the specific field to that fact. This should tell people "Hey, this isn't the actual private key. It's still encoded."

The new generic struct already gives a neat hint towards that fact. Previously it was just a byte slice.

@tarcieri tarcieri merged commit 3552be9 into RustCrypto:master Apr 8, 2025
11 checks passed
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.

2 participants