Python Own Certificate Authority
Project description
Python Own Certificate Authority (OwnCA)
OwnCA makes it easy to handle a Certificate Authority (CA) and manage certificates for hosts, servers or clients.
An example of high-level usage:
>>> from ownca import CertificateAuthority
>>> ca = CertificateAuthority(ca_storage='/opt/CA', common_name='Corp CA')
>>> example_com = ca.issue_certificate('www.example.com', dns_names=['www.example.com', 'w3.example.com'])
Basically, in these three lines we:
-
Imported the ownca Certificate Authority library
-
Created a new CA named Corp CA that uses
/opt/CA
as CA storage for certificates, keys, etc. -
Created a signed certificate by Corp CA for www.example.com, whose files are also stored in
/opt/CA/certs/www.example.com
>>> example_com.cert <Certificate(subject=<Name(CN=www.example.com)>, ...)>
More detailed usage can be found in http://ownca.readthedocs.org.
Installation
pip install ownca
Documentation
Visit http://ownca.readthedocs.org
Development
Preparing the environment
git clone git@github.com:OwnCA/ownca.git
cd ownca
pipenv shell
pipenv install -d
In case you have macOS M1:
pip uninstall cryptography cffi
LDFLAGS=-L$(brew --prefix libffi)/lib CFLAGS=-I$(brew --prefix libffi)/include pip install cffi cryptography rust --no-binary :all:
Installing & enabling pre-commit
To automatically run checks before you commit your changes you should install the git hook scripts with pre-commit:
pre-commit install
pre-commit autoupdate
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file OwnCA-0.4.0.tar.gz
.
File metadata
- Download URL: OwnCA-0.4.0.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 301cded2ef20cee96c07c1db36862fb40f0e68af5162ca73c929165e9d27d399 |
|
MD5 | d84979c60d40be82cd034821f49b0b1f |
|
BLAKE2b-256 | d1ca4a96c341523a228d655a16aedafb1e68b6d823e12bce85cd8e3bd941aa02 |
File details
Details for the file OwnCA-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: OwnCA-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd18990d19404cfed49e2ab31d85039d24f1be44c4c5b74658616983320c279a |
|
MD5 | 0959573e5f31e5b162e679cad3da5bc2 |
|
BLAKE2b-256 | 5139f4842a0bd63240fdbdd05856683020abe376238c612008ffd2c9798c0d5f |