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

EcDSA signatures: follow requested serialization format #37

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

sosthene-nitrokey
Copy link
Collaborator

Opcard only ever needed raw, but PIV needs the ASN.1 format

Opcard only ever needed `raw`, but PIV needs the ASN.1 format
src/core_api.rs Outdated

let signature = match req.format {
trussed::types::SignatureSerialization::Asn1Der => {
Bytes::from_slice(res.signature).expect("~Signature should fit")
Copy link
Member

Choose a reason for hiding this comment

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

nit: error! + unwrap to optimize out the error message

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Also fixed for other uses of expect.

@sosthene-nitrokey sosthene-nitrokey merged commit cac4bd1 into main Oct 1, 2024
2 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