CertTool
A clean, modern, fully-typed Python CLI and library for generating self-signed X.509 certificates, certificate signing requests (CSRs), and private keys.
Built for automation, reproducibility, and bulk-generation workflows used by The Lupaxa Project.
Features
- Generate self-signed certificates, private keys, and CSRs
- Generate from:
- JSON config file
- Directory of config files (bulk mode)
- Pure command-line flags
- Output:
- To stdout
- Or into an output directory, with one folder per certificate
- Supports:
- RSA key generation
- SHA-256 / SHA-384 / SHA-512 digests
- Validity period configuration
- Optional private key encryption with passphrase
- Subject Alternative Names (SANs) via JSON or CLI
- Includes:
--generate-exampleto produce a full example JSON config--inspect-certto analyze existing PEM certificates--validate-configto validate config files before use
- Fully typed, linted, formatted, and tested
- MkDocs documentation included
Installation
From PyPI
pip install lupaxa-certtool
From Source (Development Mode)
pip install -e ".[dev]"
Usage
Basic Self-Signed Certificate from CLI
certtool \
--countryName UK \
--stateOrProvinceName Somerset \
--localityName Glastonbury \
--organizationName "Lupaxa Project" \
--commonName "dev.internal"
Using JSON Configuration
Generate an Example Config
certtool --generate-example --example-file dev-internal-cert.json
Use a JSON Config File
certtool --config dev-internal-cert.json
Use a Directory of Configs (Bulk Mode)
certtool --config-dir configs/
Output Directory Structure
If you pass:
certtool --config-dir configs/ --output-dir output/
You get:
output/
├── dev.internal/
│ ├── cert.pem
│ ├── csr.pem
│ └── key.pem
└── api.internal/
├── cert.pem
├── csr.pem
└── key.pem
Each certificate gets its own folder to prevent overwriting.
Private Key Encryption
JSON
{
"passphrase": "your-secret-here"
}
CLI (Overrides JSON)
certtool --config dev-internal-cert.json --passphrase "some-secret"
Inspect a Certificate
certtool --inspect-cert output/dev.interal/cert.pem
Development
Clone the repository and install dev dependencies:
pip install -e ".[dev]"
Useful make targets:
make test # run tests
make type # type checking (mypy)
make check-style # lint + format + type
make check-all # run tests, coverage, and audit
Documentation
The published guide is at https://certtool.thelupaxaproject.org/.
Site Markdown lives in mkdocs/.
python -m pip install -r requirements.txt
make mkdocs-serve
Metadata
Release files for lupaxa-certtool 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lupaxa_certtool-0.1.9.tar.gz | 18.4 kB | With provenance | Details for lupaxa_certtool-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lupaxa_certtool-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for lupaxa_certtool-0.1.9-py3-none-any.whl |
Total release size: 40.7 kB
Release files / lupaxa_certtool-0.1.9.tar.gz
| Download URL | lupaxa_certtool-0.1.9.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e81c08f89dded0c29123349752a6cd95ef60993e53c219ab4f302f1867a6e07
|
|
BLAKE2b-256 checksum How to use checksums |
8e18890fad94848d011037e903e5724f310018c8f0037e9f77df58127cbcd07c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 7, 2026.
Transparency logRelease files / lupaxa_certtool-0.1.9-py3-none-any.whl
| Download URL | lupaxa_certtool-0.1.9-py3-none-any.whl |
|---|---|
| Size | 22.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1960d5b745dc0aa3eb3d96d0fadcbe55ff4dc7a3c121c9995ac0eb9ed31910d7
|
|
BLAKE2b-256 checksum How to use checksums |
a09ddba6763bd4ad27bdf74b9b9f2a3d7536cadad290a1c90a6361be2ab1addc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 7, 2026.
Transparency logSecurity for lupaxa-certtool 0.1.9
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for lupaxa_certtool-0.1.9.tar.gz
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 Oct 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.