wbond / certvalidator

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

Trust store #13

Closed YaokaiYang-assaultmaster closed 4 years ago

YaokaiYang-assaultmaster commented 6 years ago

Hi:

Thank you so much for the great lib.

However, which root store am I validate against if I simply call the validator.validate_usage(set(['digital_signature']))?

Appreciate your help.

wbond commented 4 years ago

It uses the trust roots from your OS. https://github.com/wbond/certvalidator/blob/master/docs/usage.md#custom-trust-rootsca-certs

On Linux it looks in common places for a ca certs file, on Windows and Mac it exports the trust roots from the OS using OS-provided APIs.

The documentation I linked to above shows how you can provide your own trust roots.