wincertstore is a Python module designed to extract CA and CRL certificates from the Windows certificate store using ctypes and the Windows system cert store API through `crypt32.dll`. However, the package is officially deprecated. Since Python 2.7.9, the standard `ssl.create_default_context()` function automatically handles loading certificates from the Windows certificate store, making `wincertstore` largely redundant for modern Python applications.
pip install wincertstoreVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to iterate through certificates in the Windows system stores ('CA', 'ROOT') using `CertSystemStore` and how to prepare a temporary CA bundle file using `CertFile` for use with Python's `ssl` module. The `CertSystemStore.itercerts()` method by default filters for `SERVER_AUTH` usage.
For Python 2.7.9+ and Python 3.x, rely on `ssl.create_default_context()` for automatic Windows certificate store integration instead of `wincertstore`. If using `requests`, ensure you are on a compatible version or use `pip-system-certs` for older Python 3.x installations.
Ensure your project's Python interpreter matches the compatible range (Python 2.7.x or 3.2.x-3.3.x). For newer Python versions (3.4+), `wincertstore` is not necessary as `ssl.create_default_context()` handles Windows cert stores natively. If you need this functionality on newer Python versions, you should use the built-in `ssl` module functions.
If you need to iterate over all certificates regardless of usage, pass `usage=None` to `itercerts()`, e.g., `store.itercerts(usage=None)`. For specific usages like client authentication, use `usage=wincertstore.CLIENT_AUTH`.
Ensure your application is running on a Windows environment if you intend to use `wincertstore`. For cross-platform certificate handling, consider using a different library or managing certificates through platform-specific mechanisms.
No dependency data recorded yet.