Skip to main content

Security Toolbox

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-example to produce a full example JSON config
    • --inspect-cert to analyze existing PEM certificates
    • --validate-config to 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
The Lupaxa Project Footer

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)

Source distribution for lupaxa-certtool 0.1.9
File Size Uploaded
lupaxa_certtool-0.1.9.tar.gz 18.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lupaxa-certtool 0.1.9
File Interpreter ABI Platform
lupaxa_certtool-0.1.9-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

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