{"id":13501322,"url":"https://github.com/sethmlarson/truststore","last_synced_at":"2025-05-14T22:09:37.222Z","repository":{"id":39652309,"uuid":"445604278","full_name":"sethmlarson/truststore","owner":"sethmlarson","description":"Verify certificates using OS trust stores","archived":false,"fork":false,"pushed_at":"2025-02-07T17:27:59.000Z","size":149,"stargazers_count":184,"open_issues_count":14,"forks_count":20,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-13T19:47:54.254Z","etag":null,"topics":["certificates","macos","python","tls","truststore","windows"],"latest_commit_sha":null,"homepage":"https://truststore.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sethmlarson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-07T17:40:56.000Z","updated_at":"2025-03-30T23:42:24.000Z","dependencies_parsed_at":"2023-02-14T14:01:33.528Z","dependency_job_id":"ea57dd37-0b44-4867-b143-cc524496bc0f","html_url":"https://github.com/sethmlarson/truststore","commit_stats":{"total_commits":88,"total_committers":14,"mean_commits":6.285714285714286,"dds":0.7159090909090908,"last_synced_commit":"419b6923724a500709e0595d4be9e3642d6cc32c"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Ftruststore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Ftruststore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Ftruststore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Ftruststore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sethmlarson","download_url":"https://codeload.github.com/sethmlarson/truststore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235701,"owners_count":22036964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["certificates","macos","python","tls","truststore","windows"],"created_at":"2024-07-31T22:01:33.163Z","updated_at":"2025-05-14T22:09:32.152Z","avatar_url":"https://github.com/sethmlarson.png","language":"Python","readme":"# Truststore\n\n[![PyPI](https://img.shields.io/pypi/v/truststore)](https://pypi.org/project/truststore)\n[![CI](https://github.com/sethmlarson/truststore/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sethmlarson/truststore/actions/workflows/ci.yml)\n\nTruststore is a library which exposes native system certificate stores (ie \"trust stores\")\nthrough an `ssl.SSLContext`-like API. This means that Python applications no longer need to\nrely on certifi as a root certificate store. Native system certificate stores\nhave many helpful features compared to a static certificate bundle like certifi:\n\n- Automatically update certificates as new CAs are created and removed\n- Fetch missing intermediate certificates\n- Check certificates against certificate revocation lists (CRLs) to avoid monster-in-the-middle (MITM) attacks\n- Managed per-system rather than per-application by a operations/IT team\n- PyPI is no longer a CA distribution channel 🥳\n\nRight now truststore is a stand-alone library that can be installed globally in your\napplication to immediately take advantage of the benefits in Python 3.10+. Truststore\nhas also been integrated into pip 24.2+ as the default method for verifying HTTPS\ncertificates (with a fallback to certifi).\n\nLong-term the hope is to add this functionality into Python itself. Wish us luck!\n\n## Installation\n\nTruststore is installed from [PyPI](https://pypi.org/project/truststore) with pip:\n\n```{code-block} shell\n$ python -m pip install truststore\n```\n\nTruststore **requires Python 3.10 or later** and supports the following platforms:\n- macOS 10.8+ via [Security framework](https://developer.apple.com/documentation/security)\n- Windows via [CryptoAPI](https://docs.microsoft.com/en-us/windows/win32/seccrypto/cryptography-functions#certificate-verification-functions)\n- Linux via OpenSSL\n\n## User Guide\n\n\u003e **Warning**\n\u003e **PLEASE READ:** `inject_into_ssl()` **must not be used by libraries or packages** as it will cause issues on import time when integrated with other libraries.\n\u003e Libraries and packages should instead use `truststore.SSLContext` directly which is detailed below.\n\u003e \n\u003e The `inject_into_ssl()` function is intended only for use in applications and scripts.\n\nYou can inject `truststore` into the standard library `ssl` module so the functionality is used\nby every library by default. To do so use the `truststore.inject_into_ssl()` function:\n\n```python\nimport truststore\ntruststore.inject_into_ssl()\n\n# Automatically works with urllib3, requests, aiohttp, and more:\nimport urllib3\nhttp = urllib3.PoolManager()\nresp = http.request(\"GET\", \"https://example.com\")\n\nimport aiohttp\nhttp = aiohttp.ClientSession()\nresp = await http.request(\"GET\", \"https://example.com\")\n\nimport requests\nresp = requests.get(\"https://example.com\")\n```\n\nIf you'd like finer-grained control or you're developing a library or package you can create your own `truststore.SSLContext` instance\nand use it anywhere you'd use an `ssl.SSLContext`:\n\n```python\nimport ssl\nimport truststore\n\nctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)\n\nimport urllib3\nhttp = urllib3.PoolManager(ssl_context=ctx)\nresp = http.request(\"GET\", \"https://example.com\")\n```\n\nYou can read more in the [user guide in the documentation](https://truststore.readthedocs.io/en/latest/#user-guide).\n\n## License\n\nMIT\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethmlarson%2Ftruststore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsethmlarson%2Ftruststore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethmlarson%2Ftruststore/lists"}