{"id":6327,"library":"certifi-linux","title":"Certifi Linux","description":"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.","status":"active","version":"1.1.0","language":"en","source_language":"en","source_url":"https://github.com/m-birke/certifi-linux","tags":["certifi","certificates","certs","linux","requests","ssl","tls"],"install":[{"cmd":"pip install certifi-linux","lang":"bash","label":"Install certifi-linux"}],"dependencies":[{"reason":"This library patches `certifi`'s functionality; `certifi` must be present in the environment.","package":"certifi","optional":false},{"reason":"Used for monkey-patching `certifi` functions.","package":"wrapt","optional":false}],"imports":[{"note":"certifi-linux monkey patches the existing certifi module. The import path remains the same as the original certifi.","symbol":"certifi","correct":"import certifi"}],"quickstart":{"code":"import certifi\nimport requests\n\n# certifi.where() should now point to your system's CA bundle\nsystem_ca_bundle_path = certifi.where()\nprint(f\"Certifi is now pointing to: {system_ca_bundle_path}\")\n\n# Verify a simple HTTPS request using the patched certifi\ntry:\n    response = requests.get('https://www.google.com/', verify=True)\n    response.raise_for_status()\n    print(\"Successfully made a secure request using the system CA bundle.\")\nexcept requests.exceptions.RequestException as e:\n    print(f\"Error making secure request: {e}\")\n    print(\"Ensure your system's CA certificates are properly configured.\")","lang":"python","description":"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`."},"warnings":[{"fix":"Ensure deployment is on a compatible Linux distribution or use platform-specific alternatives.","message":"This 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`.","severity":"breaking","affected_versions":"All"},{"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.","message":"The 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.","severity":"gotcha","affected_versions":"All"},{"fix":"Ensure `pip install certifi` is run if `certifi` is not already installed as a dependency of another package (e.g., `requests`).","message":"For `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`.","severity":"gotcha","affected_versions":"All"},{"fix":"Test thoroughly on your target Linux distribution or check the GitHub repository for updated compatibility lists.","message":"While 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.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}