Certificate chain verification
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 115
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to setup certificate verification and I am seeing strange behaviour here. Please loot at the following scenarios:
CertificateValidator(end_entity_cert).validate_usage(set([])) # Fails as no issuer is found
CertificateValidator(end_entity_cert, [intemediate_cerficate]).validate_usage(set([])) # Fails again as no issuer is found
CertificateValidator(end_entity_cert, [root_cerficate]).validate_usage(set([])) # Succeeds even though the intermediate is not provided, openssl fails this
CertificateValidator(end_entity_cert, [root_cerficate, intemediate_cerficate]).validate_usage(set([])) # Succeeds and is correct
Also there is another strange behaviour that I have noted, suppose in this same scenario I use a ValidationContext and just add the end_entity_cert to trusted_roots (no root and intermediate certs added) it seems to pass the validation. I am not sure if this is intended.
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 with CertificateValidator.validate_usage and the ValidationContext trusted_roots handling described in the scenarios. Reproduce the four chain-validation cases and the end-entity trust case, then determine the intended certificate-path behavior and add coverage for the observed results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100