Skip to main content

Verify certificates using OS trust stores

Project description

Truststore

CI

Verify certificates using OS trust stores. Supports macOS, Windows, and Linux (with OpenSSL). This project should be considered experimental.

Usage

# The following code works on Linux and macOS without other dependencies.

import socket
from truststore import TruststoreSSLContext

sock = socket.create_connection(("example.com", 443))
ctx = TruststoreSSLContext()
sock = ctx.wrap_socket(sock, server_hostname="example.com")

# Also works with libraries that accept an SSLContext object
import urllib3

http = urllib3.PoolManager(ssl_context=ctx)
http.request("GET", "https://example.com")

import aiohttp

http = aiohttp.ClientSession()
await http.request("GET", "https://example.com", ssl=ctx)

Platforms

Works in the following configurations:

Prior art

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

truststore-0.2.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

truststore-0.2.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file truststore-0.2.0.tar.gz.

File metadata

  • Download URL: truststore-0.2.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0rc1

File hashes

Hashes for truststore-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d4c77eae9c306fefd0bba66a98e434def4ad8ae9b9feb7568258ffe4bbfc991f
MD5 fb1b04cd739d803d4f072da9586a6393
BLAKE2b-256 66658a51e03d35498baf3de4fa4249810fcf139680031ea8329b64c4bd737273

See more details on using hashes here.

File details

Details for the file truststore-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: truststore-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0rc1

File hashes

Hashes for truststore-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fba8cc8fcd2839b60fee5584833c3d82c0c4004b7d2342e120fb1a335cd5b263
MD5 49879337ef1ebbf2efd1fcf054dae2d1
BLAKE2b-256 1e9b43061eebbeedbafaeb02aa90e2f4fe73c259765d0da1a3ff2d25c72738a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page