GithubHelp home page GithubHelp logo

jawah / wassima Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 36 KB

Say goodbye to certifi! ๐Ÿš€ Embrace your system root CAs. Retrieve them with ease and comfort.

License: MIT License

Rust 7.56% Python 92.44%
certifi certificate certificate-authority cross-platform rootca truststore certificates python ssl

wassima's Introduction

Wassima ๐Ÿ”’

I named this library after my wife, whom I trust the most. โค๏ธ

Download Count Total

This project offers you a great alternative to certifi. It is a simple yet efficient wrapper around MIT licensed rustls-native-certs.

This project allows you to access your original operating system trust store, thus helping you to verify the remote peer certificates.

It works as-is out-of-the-box for MacOS, Windows, and Linux. Available on PyPy and Python 3.7+

If your particular operating system is not supported, we will make this happen! Open an issue on the repository.

For now, it is not supported to call your OS certificate verify native function. Use your Python native capabilities for it.

โœจ 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

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.

wassima's People

Contributors

ousret avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wassima's Issues

[FYI] `wassima` is now available from ArchLinux User Repository as `python-wassima-git`

[ This is an informational message only. No action is required on your part, and the issue can be closed at your discretion. ]

I thought you'd like to know that ArchLinux users can now install wassima directly from ArchLinux User Repository (AUR) as python-wassima-git:

The package can be installed using an AUR helper, e.g. yay:

ยป yay -S python-wassima-git

This will build the python module from the latest commit, and install it along with the README and the LICENSE.

๐Ÿ™

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.