A Python toolkit and CLI for generating self-signed certificates, CSRs, and private keys.
Project description
The Lupaxa Security Toolbox.
Part of The Lupaxa Project.
lupaxa-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 "example.local"
Using JSON Configuration
Generate an example config
certtool --generate-example --example-file example-cert.json
Use a JSON config file
certtool --config example-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/
├── example.local/
│ ├── 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 server.json --passphrase "some-secret"
Inspect a Certificate
certtool --inspect-cert output/example.local/cert.pem
Development
Run tests
make test
Type checking
make type
Lint, format, and style checks
make check-style
Run everything
make check-all
Build documentation
mkdocs serve
Documentation
The project includes MkDocs documentation.
Online documentation:
Full documentation is available in the docs/ directory or served locally:
Serve docs locally
mkdocs serve
Then open the printed URL (usually http://127.0.0.1:8000/) in your browser.
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
Repository Layout
lupaxa-certtool/
├── src/lupaxa/certtool/
│ ├── cli.py
│ ├── certs.py
│ ├── utils.py
│ ├── config.py
│ ├── example.py
│ ├── exceptions.py
│ ├── version.py
│ └── __init__.py
├── docs/
├── tests/
├── mkdocs.yml
├── Makefile
├── pyproject.toml
├── .editorconfig
├── .gitignore
└── README.md
© The Lupaxa Project.
Where exploration meets precision.
Where the untamed meets the engineered.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lupaxa_certtool-0.1.1.tar.gz.
File metadata
- Download URL: lupaxa_certtool-0.1.1.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e31662257a01c0965c3b03574eab013f2ee476fc574a2308c00a2b3bb6f0f4fd
|
|
| MD5 |
230216a639e847dff4c97e430088495a
|
|
| BLAKE2b-256 |
03d1f60a82b8a2b309e93075248f9a10f1b81a3542140fa3cdc12c251bbd2dd5
|
Provenance
The following attestation bundles were made for lupaxa_certtool-0.1.1.tar.gz:
Publisher:
generate-release.yml on lupaxa-security-toolbox/certtool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lupaxa_certtool-0.1.1.tar.gz -
Subject digest:
e31662257a01c0965c3b03574eab013f2ee476fc574a2308c00a2b3bb6f0f4fd - Sigstore transparency entry: 714039544
- Sigstore integration time:
-
Permalink:
lupaxa-security-toolbox/certtool@7989858ebf5efe92b365f3c0ee7309e411f58b00 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/lupaxa-security-toolbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
generate-release.yml@7989858ebf5efe92b365f3c0ee7309e411f58b00 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lupaxa_certtool-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lupaxa_certtool-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3beb3fd9d68cb9b089cee9269d71b3f435afff0865a4e71566381a0b8edb4353
|
|
| MD5 |
b32ea7c7199d5bfcd0456e3d042cc0b2
|
|
| BLAKE2b-256 |
8c1b792189e3aae3031a051383ba3f6199d16b335cd7a56b085c3e7a6bcbaf37
|
Provenance
The following attestation bundles were made for lupaxa_certtool-0.1.1-py3-none-any.whl:
Publisher:
generate-release.yml on lupaxa-security-toolbox/certtool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lupaxa_certtool-0.1.1-py3-none-any.whl -
Subject digest:
3beb3fd9d68cb9b089cee9269d71b3f435afff0865a4e71566381a0b8edb4353 - Sigstore transparency entry: 714039553
- Sigstore integration time:
-
Permalink:
lupaxa-security-toolbox/certtool@7989858ebf5efe92b365f3c0ee7309e411f58b00 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/lupaxa-security-toolbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
generate-release.yml@7989858ebf5efe92b365f3c0ee7309e411f58b00 -
Trigger Event:
push
-
Statement type: