validate_usage() fails when cert doesn't have keyUsage set
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 115
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
If KeyUsage extension is not set, then valid implementations behave as if all the keyUsage bits were set, but validate_usage() fails. I haven't tested, but the same is likely true for the extended_key_usage parameter.
FWIW, there is no equivalent to extended_optional for the keyUsage., which seems valid given the name of the method. That said, for when only wanting to test path validation (not usage), it would be nice if _validate_path() were not a "hidden" (i.e., starting with '_')...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing validate_usage() and _validate_path() in the certvalidator codebase, then inspect how absent keyUsage and extended_key_usage extensions are handled. Reproduce validation with certificates lacking those extensions and compare the behavior with the expected all-bits-set semantics; done means valid certificates no longer fail usage validation in those cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100