Skip to main content

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.

Release files for certcloner 2024.3.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for certcloner 2024.3.11
File Size Uploaded
certcloner-2024.3.11.tar.gz 23.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for certcloner 2024.3.11
File Interpreter ABI Platform
certcloner-2024.3.11-py3-none-any.whl Python 3 none any Details

Total release size: 29.8 kB

Release files / certcloner-2024.3.11.tar.gz

Download URL certcloner-2024.3.11.tar.gz
Size 23.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1b6fff6c36d76ce4094fe96be2a3acbee612f80e6d97408bdf9ad683b2658e75
BLAKE2b-256 checksum
How to use checksums
4fc2006e29a34237b11999006845531a7ba1a8eff440a0847afc1aa6a14cdd91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / certcloner-2024.3.11-py3-none-any.whl

Download URL certcloner-2024.3.11-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef620ac5dd2200dc279eb9e15835c47e29eb439e94c2c2b38146fa9ba46669fb
BLAKE2b-256 checksum
How to use checksums
1218e22f39eacca84a54f001254f2e1495ed5b0756f5aa77502a274410ba5642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.8

Release history Release notifications | RSS feed

This release

2024.3.11 This release

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