mscerts

2025.8.29 · active · verified Thu Apr 16

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.

Common errors

Warnings

Install

Imports

Quickstart

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.

import mscerts

# Get the path to the Microsoft CA bundle file
ca_bundle_path = mscerts.where()
print(f"Microsoft CA bundle located at: {ca_bundle_path}")

# Example of how you might use it with the requests library
# (Note: requests often automatically finds system/certifi bundles)
# import requests
# try:
#     response = requests.get('https://example.com', verify=ca_bundle_path)
#     print(response.status_code)
# except requests.exceptions.RequestException as e:
#     print(f"Request failed: {e}")

view raw JSON →