Registry / auth-security / certifi-linux

certifi-linux

JSON →
library1.1.0pypypi✓ verified 84d ago

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.

pip install certifi-linux
INSTALL
IMPORT
SIG · CERTIFI-LINUX
C
certifi-linux
auth-securitypythonv1.1.0
Install
1.9s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.5MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.9s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

certifi_linux
import certifi_linux
import certifi
patch_certifi
from certifi_linux import patch_certifi
import certifi

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.")
Debug
Known issues
breakingThis library is strictly for Linux operating systems. It will not work on Windows or other non-Linux platforms. For Windows, consider using `pip-system-certs`.
fix
Ensure deployment is on a compatible Linux distribution or use platform-specific alternatives.
affects: All
gotchaThe library operates by monkey-patching functions within the `certifi` package (`certifi.where()` and `certifi.contents()`). While generally robust, this approach could theoretically lead to conflicts if other installed libraries also attempt to modify `certifi`'s behavior.
fix
Verify compatibility with other libraries that might interact with `certifi`. If unexpected behavior occurs, inspect the order of imports and any other patching mechanisms.
affects: All
gotchaFor `certifi-linux` to function, the `certifi` package must be installed in the environment, as `certifi-linux` patches `certifi`'s functionality rather than replacing it entirely. `certifi` is not explicitly listed as a direct dependency in `certifi-linux`'s `setup.py`.
fix
Ensure `pip install certifi` is run if `certifi` is not already installed as a dependency of another package (e.g., `requests`).
affects: All
gotchaWhile broadly compatible, `certifi-linux` has been explicitly tested on specific Linux distributions (Alpine, Ubuntu, Debian, Fedora, CentOS, RHEL). Functionality on untested distributions (e.g., Arch, Slackware, OpenWRT, FreeBSD, SUSE, Gentoo) is not guaranteed and may require manual verification.
fix
Test thoroughly on your target Linux distribution or check the GitHub repository for updated compatibility lists.
affects: All
Upgrade
Version history
1.1.0latest on PyPI · released May 27, 2025
Audit
Dependencies
certifirequiredThis library patches `certifi`'s functionality; `certifi` must be present in the environment.
wraptrequiredUsed for monkey-patching `certifi` functions.
Agent activity
27 hits · last 30 days
node
26
OpenAI (training)
1
Resources
certifi-linux — pip install certifi-linux · libregistry