Skip to main content

Build Status Documentation Status codecov pypi pypi Downloads pypi

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:

  1. Imported the ownca Certificate Authority library

  2. Created a new CA named Corp CA that uses /opt/CA as CA storage for certificates, keys, etc.

  3. 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

Metadata

Release files for OwnCA 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OwnCA 0.4.0
File Size Uploaded
OwnCA-0.4.0.tar.gz 41.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for OwnCA 0.4.0
File Interpreter ABI Platform
OwnCA-0.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 59.4 kB

Release files / OwnCA-0.4.0.tar.gz

Download URL OwnCA-0.4.0.tar.gz
Size 41.9 kB
Tags Source
SHA-256 checksum
How to use checksums
301cded2ef20cee96c07c1db36862fb40f0e68af5162ca73c929165e9d27d399
BLAKE2b-256 checksum
How to use checksums
d1ca4a96c341523a228d655a16aedafb1e68b6d823e12bce85cd8e3bd941aa02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / OwnCA-0.4.0-py2.py3-none-any.whl

Download URL OwnCA-0.4.0-py2.py3-none-any.whl
Size 17.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fd18990d19404cfed49e2ab31d85039d24f1be44c4c5b74658616983320c279a
BLAKE2b-256 checksum
How to use checksums
5139f4842a0bd63240fdbdd05856683020abe376238c612008ffd2c9798c0d5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page