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
Hashes for OwnCA-0.3.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76206ce79c93161f72fceac6fbd3484fe25514d2c0ca7704292e6dd37dee71a0 |
|
MD5 | 8aae9fddc803bb514049e05d5b1d32dd |
|
BLAKE2b-256 | a2f6aa277a541b93a693ba68421a0631d67c45c0df7706b11f42f8c4f2fdf32f |