google / google/certificate-transparency-go
Allow lax parsing of keyUsage bit string
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 322
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 5
Description
This [certificate](https://crt.sh/?id=6039677462&opt=zlint,cablint) 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
https://github.com/google/certificate-transparency-go/blob/5162ff69d3bda920f809f3e33dc3049b011ca935/asn1/asn1.go#L235
should be something like
```
(!lax && bytes[len(bytes)-1]&((1<
Contributor guide
Research direction
Read asn1/asn1.go around line 235 and inspect the certificate linked in the issue. Verify that strict parsing continues to reject non-zero padding bits while lax parsing accepts valid BER encodings; completion should demonstrate the expected behavior in both modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- security
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100