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
import ssl
import truststore

sock = socket.create_connection(("example.com", 443))
ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
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.3.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.3.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: truststore-0.3.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.0

File hashes

Hashes for truststore-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5afa72b0b92ca0f74149bd39b6f6e476f4b214692d27502adbbea6e1d36cc93f
MD5 4084b4cd01de4924fd3c99accf5dfdd1
BLAKE2b-256 d36cf9df35e13341d58b26f9c32536d93ce1d65f514b7e4feeec1c318a799a94

See more details on using hashes here.

File details

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

File metadata

  • Download URL: truststore-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.0

File hashes

Hashes for truststore-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 366e9e15c53b1b343288792000e618e0ac5470d5c7a8d1b5ad5c347ace35d5da
MD5 b606e6387278e4d1d25d15bc0adaf79c
BLAKE2b-256 c84997e348d3385df67b500678c83569cb35fa8319074d485ac1ba130333f8ff

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