Skip to main content

Clones certificates with keys you control

Project description

certcloner

PyPI - Version PyPI - Python Version


So you need to create some test data for something that is signed with a certificate? Then you need to create your own certificate, preferably with a full chain, as similar to the original as possible. You could always fire up step-ca or something similar, but why not just clone the original chain, so that everything is as close to the real thing as possible?

Certcloner lets you do just that. Give it some certificates, and it will create clones with a private key that you control.

Limitations:

  • Subject and Authority Key Identifiers will, by default, be updated, but stuff like SCT and CRL/AIA urls will not be.
  • Only RSA and ECC keys are supported.

Installation

You probably want to install this using pipx:

pipx install certcloner

Or, you can install it with plain pip:

pip install certcloner

Usage

Just point certcloner to one or several files with certificates, in either PEM or DER format:

certcloner ./mycert1.pem ./mycert2.crt ./mychain.pem

It will load all certificates, and output copies (plus the corresponding private key) to standard out.

Advanced usage:

Usage: certcloner [OPTIONS] [FILES]...

Options:
  --version               Show the version and exit.
  --no-comment            Do not include a comment in the finished certs.
  --keep-key-identifiers  Keep the original key identifiers in the finished
                          certs.
  -h, --help              Show this message and exit.

License

certcloner is distributed under the terms of the MIT license.

Project details


Download files

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

Source Distribution

certcloner-2024.3.11.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

certcloner-2024.3.11-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file certcloner-2024.3.11.tar.gz.

File metadata

  • Download URL: certcloner-2024.3.11.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for certcloner-2024.3.11.tar.gz
Algorithm Hash digest
SHA256 1b6fff6c36d76ce4094fe96be2a3acbee612f80e6d97408bdf9ad683b2658e75
MD5 3a1d261305109dd0347298f2ff8abb9e
BLAKE2b-256 4fc2006e29a34237b11999006845531a7ba1a8eff440a0847afc1aa6a14cdd91

See more details on using hashes here.

File details

Details for the file certcloner-2024.3.11-py3-none-any.whl.

File metadata

File hashes

Hashes for certcloner-2024.3.11-py3-none-any.whl
Algorithm Hash digest
SHA256 ef620ac5dd2200dc279eb9e15835c47e29eb439e94c2c2b38146fa9ba46669fb
MD5 8b6ae0e9b329f489e6dcb73e6fd9941a
BLAKE2b-256 1218e22f39eacca84a54f001254f2e1495ed5b0756f5aa77502a274410ba5642

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page