{"id":3318,"library":"wassima","title":"Access OS Root Certificates","description":"wassima is a Python library designed to simplify access to your operating system's root certificates, aiming to provide similar ease of use as `certifi` but leveraging the system's native trust store. It is currently at version 2.0.6 and maintains an active release cadence, primarily for bug fixes and updates to its embedded CA bundle.","status":"active","version":"2.0.6","language":"en","source_language":"en","source_url":"https://github.com/jawah/wassima","tags":["python","ssl","certificates","trust-store","os-certs","security"],"install":[{"cmd":"pip install wassima","lang":"bash","label":"Install wassima"}],"dependencies":[],"imports":[{"symbol":"get_certs_paths","correct":"from wassima import get_certs_paths"},{"symbol":"trust_manager","correct":"from wassima import trust_manager"}],"quickstart":{"code":"import ssl\nfrom wassima import trust_manager\n\n# Get an SSLContext configured with system trust store\n# This context can be used with HTTP clients like `requests` or `httpx`.\ncontext: ssl.SSLContext = trust_manager()\n\nprint(f\"SSLContext type: {type(context)}\")\nprint(f\"Context protocol: {context.protocol}\")\n\n# You can optionally inspect loaded certificates (example):\n# for cert in context.get_ca_certs():\n#     print(f\"  Loaded CA: {cert.subject.rfc4514_string()}\")\n\n# Example usage with `requests` (if installed):\n# import requests\n# try:\n#     response = requests.get(\"https://example.com\", verify=context)\n#     print(f\"Request to example.com successful: {response.status_code}\")\n# except Exception as e:\n#     print(f\"Request failed: {e}\")","lang":"python","description":"This quickstart demonstrates how to obtain an `ssl.SSLContext` object configured with your operating system's root certificates using `wassima.trust_manager()`. This context can then be passed to HTTP clients for secure communication."},"warnings":[{"fix":"Update imports and remove references to `RUSTLS_LOADED`. For debugging, inspect `wassima`'s internal logic directly. Be aware of potential performance changes due to the shift to pure Python.","message":"Version 2.0.0 removed the native Rust extension, the `RUSTLS_LOADED` constant, and the `python -m wassima` debugging utility. Code relying on these features will break. The library is now pure Python.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Review your application's trust requirements. `wassima` will now use its internal CCADB bundle if the system trust store cannot be found or loaded, which might have different implications than `certifi`'s bundle.","message":"The optional dependency on `certifi` was removed in `wassima` 2.0.0. While `wassima` now includes its own embedded CCADB bundle as a fallback, users who previously relied on `certifi`'s specific trust behavior might experience different trust store resolution.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure your `wassima` installation is up-to-date (2.0.6 or newer). If issues persist, verify file permissions for system certificate directories or consult `wassima`'s GitHub issues for OS-specific troubleshooting.","message":"`wassima` might encounter OS-specific issues or permissions errors when attempting to discover and load system trust stores. Past versions have seen fixes for PermissionError on Linux, deep scan slowness on FreeBSD, and MacOS truststore inconsistencies.","severity":"gotcha","affected_versions":"<2.0.6"},{"fix":"Monitor logs or debug `wassima`'s internal certificate loading process if you suspect an incorrect trust store is being used. Ensure your system's trust store is correctly configured and accessible to the Python process running `wassima`.","message":"If `wassima` cannot find or load the official system trust store, it will silently fall back to an embedded CCADB bundle. This might lead to unexpected trust decisions if the embedded bundle's policy differs from the system's intended policy.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}