-
Notifications
You must be signed in to change notification settings - Fork 133
dsa: capture error #941
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
dsa: capture error #941
Conversation
149d490
to
895e437
Compare
895e437
to
40003e0
Compare
40003e0
to
5f7c6ad
Compare
ecdsa/src/der.rs
Outdated
assert!( | ||
Signature::from_der(&[ | ||
der::Tag::Sequence.into(), | ||
der::Tag::Sequence.number().value().try_into().unwrap(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly a fan.
Maybe we should have a impl TryFrom<der::Tag> for u8
or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and we lose the constructed bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There used to be a From
impl, but I guess it was removed when tags were changed to support longer than 1-byte lengths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, and we lost the Constructed
bit at this moment so you have to rebuild it manually. I don't know.
I think I'm fine with just hardcoding the value here with a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old From
impl and a hypothetical TryFrom
impl should preserve the constructed bit, but hardcoding it seems fine for now
5f7c6ad
to
c5854a9
Compare
No description provided.