Wassima 🔒
I named this library after my wife, whom I trust the most. ❤️
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 MacOS (10.15+), Windows (7+), and Linux. Available on PyPy and Python 3.7+
If your particular operating system is not supported, we can make this happen! Open
an issue on the repository.
✨ Installation
Using pip:
pip install wassima -U
Get started
A) Create a SSLContext
import wassima
ctx = wassima.create_default_ssl_context()
B) Retrieve individually root CAs in a binary form (DER)
import wassima
certs = wassima.root_der_certificates()
C) Retrieve individually root CAs in a string form (PEM)
import wassima
certs = wassima.root_pem_certificates()
D) Retrieve a single bundle (concatenated) list of PEM certificates like certifi does
import wassima
bundle = wassima.generate_ca_bundle()
C) Register your own CA in addition to the system's
import wassima
wassima.register_ca(open("./myrootca.pem", "r").read())
bundle = wassima.generate_ca_bundle()