wbond / certvalidator

Python library for validating X.509 certificates and paths
MIT License
107 stars 31 forks source link

validate_usage() fails when cert doesn't have keyUsage set #24

Open kwatsen opened 4 years ago

kwatsen commented 4 years ago

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 '_')...