Skip to main content

Access your OS root certificates with utmost ease

Project description

Wassima 🔒

I named this library after my wife, whom I trust the most. ❤️

Download Count Total

This project offers you a great alternative to the MPL licensed certifi.

This project allows you to access your original operating system trust store, thus helping you to verify the remote peer certificates. It automatically fallback to an embedded trust store generated from the CCADB trusted source.

It works as-is out-of-the-box for any operating systems out there. Available on PyPy and Python 3.7+

✨ Installation

Using pip:

pip install wassima -U

Get started

A) Create a SSLContext

import wassima

ctx = wassima.create_default_ssl_context()
# ... The context magically contain your system root CAs, the rest is up to you!

B) Retrieve individually root CAs in a binary form (DER)

import wassima

certs = wassima.root_der_certificates()
# ... It contains a list of certificate represented in bytes

C) Retrieve individually root CAs in a string form (PEM)

import wassima

certs = wassima.root_pem_certificates()
# ... It contains a list of certificate represented in string

D) Retrieve a single bundle (concatenated) list of PEM certificates like certifi does

import wassima

bundle = wassima.generate_ca_bundle()
# ... It contains a string with all of your root CAs!
# It is not a path but the file content itself.

C) Register your own CA in addition to the system's

import wassima

# register CA only accept string PEM (one at a time!)
wassima.register_ca(open("./myrootca.pem", "r").read())
bundle = wassima.generate_ca_bundle()
# ... It contains a string with all of your root CAs, PLUS your own 'myrootca.pem'.
# It is not a path but the file content itself.

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

wassima-2.0.6.tar.gz (145.4 kB view details)

Uploaded Source

Built Distribution

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

wassima-2.0.6-py3-none-any.whl (140.6 kB view details)

Uploaded Python 3

File details

Details for the file wassima-2.0.6.tar.gz.

File metadata

  • Download URL: wassima-2.0.6.tar.gz
  • Upload date:
  • Size: 145.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wassima-2.0.6.tar.gz
Algorithm Hash digest
SHA256 7c7fa67161ebe0c0ffbbc4c648186de80124f62474682b57c3ac60520d5c471b
MD5 b352b7716ba29fbb345bbb837b458514
BLAKE2b-256 961de27f3b2730e1964e819d47ad1c7ffde135a3658b120a441ecc40be0c627d

See more details on using hashes here.

Provenance

The following attestation bundles were made for wassima-2.0.6.tar.gz:

Publisher: CI.yml on jawah/wassima

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wassima-2.0.6-py3-none-any.whl.

File metadata

  • Download URL: wassima-2.0.6-py3-none-any.whl
  • Upload date:
  • Size: 140.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wassima-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 24c327cfce58e36b1e554feb809a12cd6677e39158dee419deb0d16b8f648f0d
MD5 1b019d0dc62ca7d8d326dc745f57cf1b
BLAKE2b-256 0a10bd9b185b33ecd2b2523eb83bb1088e6dfdc1dad19136d91312dce9996c37

See more details on using hashes here.

Provenance

The following attestation bundles were made for wassima-2.0.6-py3-none-any.whl:

Publisher: CI.yml on jawah/wassima

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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