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

Allow lax parsing of keyUsage bit string #986

Open
jschanck opened this issue Oct 4, 2022 · 0 comments
Open

Allow lax parsing of keyUsage bit string #986

jschanck opened this issue Oct 4, 2022 · 0 comments

Comments

@jschanck
Copy link

jschanck commented Oct 4, 2022

This certificate has a non-zero padding bit in its keyUsage extension and it has been logged by several CT logs.

It would be useful if the asn1 parser in this library allowed lax parsing of bit strings. In particular, lax parsing should allow valid BER encodings with non-zero padding bits. So

bytes[len(bytes)-1]&((1<<bytes[0])-1) != 0 {

should be something like

 (!lax && bytes[len(bytes)-1]&((1<<bytes[0])-1) != 0)
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

No branches or pull requests

1 participant