Certifi Linux

1.1.0 · active · verified Wed Apr 15

Certifi-linux is a Python library (version 1.1.0) that enhances the `certifi` package by redirecting its certificate authority (CA) bundle resolution to the Linux system trust store instead of using `certifi`'s bundled certificates. This is particularly useful in enterprise Linux environments where system-wide certificate management is preferred. The library achieves this by monkey-patching `certifi.where()` and `certifi.contents()`. It is active and stable, with releases tied to underlying `certifi` and system trust store updates.

Warnings

Install

Imports

Quickstart

After installation, `certifi-linux` automatically patches the `certifi` module. You can verify the patch by checking `certifi.where()`, which should now return the path to your system's CA trust store, and by making a simple HTTPS request using a library like `requests` that relies on `certifi`.

import certifi
import requests

# certifi.where() should now point to your system's CA bundle
system_ca_bundle_path = certifi.where()
print(f"Certifi is now pointing to: {system_ca_bundle_path}")

# Verify a simple HTTPS request using the patched certifi
try:
    response = requests.get('https://www.google.com/', verify=True)
    response.raise_for_status()
    print("Successfully made a secure request using the system CA bundle.")
except requests.exceptions.RequestException as e:
    print(f"Error making secure request: {e}")
    print("Ensure your system's CA certificates are properly configured.")

view raw JSON →