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.8

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

Built distribution (wheel)

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

Total release size: 40.7 kB

Release files / lupaxa_certtool-0.1.8.tar.gz

Download URL lupaxa_certtool-0.1.8.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5408dd8e0a95babbc7335e8b4edca5d21d344af4093a5ab302edd082576fb76b
BLAKE2b-256 checksum
How to use checksums
1af2081744544d3b0303f7736c8a523d32b33b65d94288c98ed324d6b2effbc7
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 29, 2026.

Transparency log

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

Download URL lupaxa_certtool-0.1.8-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2303466d92a5893add5119d9b56a8cafc5a857a4126144ac037ab74f3de685f
BLAKE2b-256 checksum
How to use checksums
4219f7e9c75d2b67305f08f63d0d90b6a2905cdac369a71aa4f844e41b536a57
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 29, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.9

2 release files

This release

0.1.8 This release

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