Skip to main content

Project Logo

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

Documentation

The project includes MkDocs documentation.

Online documentation:

Documentation

Full documentation is available in the docs/ directory or served locally:

Serve docs locally

mkdocs serve

Then open the local URL printed by MkDocs 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
The Lupaxa Project Footer

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lupaxa_certtool-0.1.5.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lupaxa_certtool-0.1.5-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file lupaxa_certtool-0.1.5.tar.gz.

File metadata

  • Download URL: lupaxa_certtool-0.1.5.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lupaxa_certtool-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9f3c0e9ff3e0939b0915f93fed8fae9d418b633bc3c3b2dad41f5512429b4e46
MD5 c3bdd9f89f784d8c19af554b212e945f
BLAKE2b-256 86e25f092889ba370f2efa0c7343c1c0735dba77f4a1a0a5a868c113503e4a93

See more details on using hashes here.

Provenance

The following attestation bundles were made for lupaxa_certtool-0.1.5.tar.gz:

Publisher: generate-release.yml on lupaxa-security-toolbox/certtool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lupaxa_certtool-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: lupaxa_certtool-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for lupaxa_certtool-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 88c071b150a8aa6a3df6d6c51af3832e76923671bfd180c82a7defae88fe2867
MD5 9f017f671be912cc04ffe559f7c8bb76
BLAKE2b-256 33da6f6148b0941f2635a1767221639579493e3db2f8a3a85639d5926ef679f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for lupaxa_certtool-0.1.5-py3-none-any.whl:

Publisher: generate-release.yml on lupaxa-security-toolbox/certtool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.1

2 files

0.1.0

2 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