You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report ASN.1 decoding errors using a different error type than Unspecified #379
Returning Unspecified here just gets turned into BadDER elsewhere... maybe in the future it would be nice to have DER-related functions return a DER error for easier mapping?
Sounds like a good idea.
AFAICT there's no cases where we're parsing secret DER, so differentiating encoding errors from other errors isn't a security issue, and it would be a usability improvement. One way to do it would be to define an strct ASN1Error; type. Then we'd have to change ever DER-parsing function to return an enum of errors, one label of which is ASN1Error, e.g.
Activity
Use a more specific error instead of unspecified::Error for DER encod…
briansmith commentedon Jul 12, 2019
Closing this. Some of this was already done (e.g. for private key parsing). If more needs to be done, we can do that in separate issues/PRs.