Certomancer
Quickly construct, mock & deploy PKI test configurations using simple declarative configuration. Includes CRL, OCSP and time stamping service provisioning.
Requires Python 3.9 or later.
Quick start
Certomancer is available on PyPI. See example.yml for an example config file.
$ pip install 'certomancer[web-api]'
$ certomancer --config example.yml animate
This will run the Certomancer Animator WSGI app on your local machine, behind a development web
server. Point your browser to http://localhost:9000 and take a look around.
For more information, see the documentation below.
Installing the development version
To build and install an (unreleased) development version, you can proceed as follows.
$ git clone https://github.com/MatthiasValvekens/certomancer
$ cd certomancer
$ python -m build
$ pip install dist/certomancer*.whl
Demo
There's a demo on asciinema.org, demonstrating some of the core features of Certomancer. See link below.
FOSDEM '22 talk
I gave a lightning talk on testing & mocking PKI services in the Testing & Automation devroom at FOSDEM 2022. Certomancer was (of course) featured in the presentation. If you want to learn more, or watch the recording, have a look at the talk page for further info. Slides are included as well.
Features
- Certomancer's core APIs are stateless: the same request should always return the same result.
This property makes it very useful for automated testing.
- Note that "the same result" does not necessarily mean "byte-for-byte equal". This is because some signing schemes (like ECDSA) involve random nonces. In addition to that, time is also a factor in certain cases (but Certomancer does permit time manipulation).
- Declarative, YAML-based configuration.
- Minimal input validation, so you can generate deliberately broken certificates if you need to.
requests-mockintegration.- Attribute certificate support (
0.7.0and up) - Ultra-lightweight WSGI application: the Certomancer Animator serves CRLs, OCSP responses, timestamps and more. This component requires Werkzeug, and optionally Jinja2 for the index view. Other than a web server and WSGI application server, there are no application dependencies.
- Plugin framework to support arbitrary certificate / CRL extensions and additional services.
These plugins are compatible with the WSGI and
requests-mockintegrations without additional configuration. - Certomancer is composable: since the Certomancer Animator is a bare-bones WSGI application, you can plug it into whatever web application framework you want with minimal overhead. Hence, for particularly complicated scenarios where the plugin API or existing integrations aren't sufficient, it is very easy to use Certomancer as a library, or wrap it as a component of some other WSGI application.
- With pyca/cryptography installed, Certomancer can also output PKCS#12 files if your tests require those.
- With python-pkcs11 installed, Certomancer can write keys and certificates to PKCS#11 tokens as well.
Non-features
Certomancer is a testing tool for developers that write software to interface with public-key infrastructure. It is NOT intended to be used to manage production PKI deployments. Certomancer is very much garbage-in garbage-out, and happily ignores validation & security best practices in favour of allowing you to abuse your codebase in the worst possible ways. Consider yourself warned.
Documentation
Metadata
Release files for certomancer 0.16.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| certomancer-0.16.0.tar.gz | 295.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| certomancer-0.16.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 376.8 kB
Release files / certomancer-0.16.0.tar.gz
| Download URL | certomancer-0.16.0.tar.gz |
|---|---|
| Size | 295.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7d3e844501062061341b49ae7d708a138b6f52c2ade1970701bf17eb0004a06
|
|
BLAKE2b-256 checksum How to use checksums |
7caccf3ad931daf3ca515a33cb3609038f0682def085e7a5557f4b8b785c536a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency logRelease files / certomancer-0.16.0-py3-none-any.whl
| Download URL | certomancer-0.16.0-py3-none-any.whl |
|---|---|
| Size | 81.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d59cc5ee4ad25ceb8c5192aad21939c734417f48559a3ec2af05b1520c956f6
|
|
BLAKE2b-256 checksum How to use checksums |
ec67e660dbe94803ed31a556dc7f132932e2c20fb4040a1ce73a611786af33c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.
Transparency log