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

Release files for lupaxa-certtool 0.1.7

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.7
File Size Uploaded
lupaxa_certtool-0.1.7.tar.gz 18.4 kB Details

Built distribution (wheel)

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

Total release size: 40.7 kB

Release files / lupaxa_certtool-0.1.7.tar.gz

Download URL lupaxa_certtool-0.1.7.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d2da82dd62b129c8966b766c9f9e03169a06961bd7f0324f0fd78227d3254bb4
BLAKE2b-256 checksum
How to use checksums
7345cdda9ddbc2ec1cb8d5c6f046dfba556b185b82ade5b200ba4170c61aff21
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 Sep 25, 2026.

Transparency log

Release files / lupaxa_certtool-0.1.7-py3-none-any.whl

Download URL lupaxa_certtool-0.1.7-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5a8040ecfcc9f34cfcf4eb7e55331e865610509c069924ce4e681f9010f0089
BLAKE2b-256 checksum
How to use checksums
26ec34c41c118206fbca67b9f303f81213328119d0bf45762fa68f31411553da
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 Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.7 This release

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