mscerts (version 2025.8.29) is a Python package designed to provide easy access to the Root Certificate Authorities present in the Microsoft Trusted Root Program. It functions as a fork of Kenneth Reitz's `certifi` project, offering Microsoft's collection of root certificates. The library typically sees annual updates to reflect changes in Microsoft's CA store.
pip install mscertsVerified import paths — ran on the pinned version, not inferred.
The primary use case for `mscerts` is to retrieve the file path to the Microsoft Root CA bundle, which can then be used by other libraries (like `requests`) for SSL/TLS verification. You can also get the path from the command line.
Be aware of the nuances of CA trust when using static bundles. Consider whether `certifi` is a more appropriate choice for broader compatibility and general web trust. If `mscerts` is essential, understand that its trust might not perfectly align with real-time Windows system trust.
Do not attempt to modify the `cacert.pem` file provided by `mscerts` directly. If custom certificates are needed, you will need to manage your own certificate trust store or combine `mscerts` with other certificates as required by your HTTP client or SSL/TLS library.
Explicitly configure your HTTP client to use the `mscerts` bundle. For `requests`, pass the path obtained from `mscerts.where()` to the `verify` parameter: `requests.get(url, verify=mscerts.where())`.
Ensure the correct import statement `import mscerts` is used, and functions like `where()` are called directly on the `mscerts` module. Double-check your spelling.