A simple command line tools to create and read CSR and P12
Project description
Python module to generate key, certificate request, self signed certificate and p12 certificate
Information
This can be used only with python2.7
Getting started
required modules:
Click
pyOpenSSL
pycparser
PyYAML
Installing package using pip
$ pip install CertGenerator
Usage
Usage: cert [OPTIONS] COMMAND [ARGS]... A command line tool to create and read CSR and P12 Options: -v, --verbose Display only if necessary -d, --debug Display all details -V, --version show version and exit -h, --help Show this message and exit. Commands: config Edit or read config ini create Create a single CSR create-multiple Create multiple certificate using csv file create-multiple-p12 Create multiple p12 using csv file create-p12 Create a simple p12 Need key file and pem file init Create or edit certificate folder and csv file Add... read Read csr or p12
PRE-CONFIGURATION
Configuration files
serial |
---|
test1 |
test2 |
test3 |
config.ini
- Create default folder
May require sudo
Default folder => $HOME/Documents/CertGenerator/
copy default csv file to $HOME/Documents/CertGenerator/csv/serial.csv
copy yaml file to $HOME/Documents/CertGenerator/csr.yaml
$ sudo cert init
- To change default folder or default csv:
May require sudo
$ sudo cert init -cert [path/of/folder] -csv [path/of/csv/file]
or
$ sudo cert config edit -cert [path/of/folder] -csv [path/of/csv/file]
- To edit yaml file:
Enter the desired subject
Enter “-” to keep empty
If you want to create multiple csr using serial.csv, don’t use Commmon Name => just enter “-” to keep empty
Note: You always have old csr.yaml in folder under format csr.yam_[date od modification]
$ cert config edit-yaml
CONFIGURATION
Create csr
Create one csr
Use -c if you want to use csr.yaml to create csr
Use -f to overwrite existing csr
The key and csr files will be created in {folder}/certificate/csr/
- Example: With the command below it will create
{folder}/certificate/csr/test/test.csr
{folder}/certificate/csr/test/test.key
$ cert create test -c [-f]
Create multiple csr
Use -c if you want to use csv file and csr.yaml
Use -f to overwrite existing csr
* cert create-multiple -c [-f]
Create p12
Create one p12
You need pem file and key file:
Use -f to overwrite existing p12
$ cert create-p12 test.p12 [-f] --pem [path/of/pem file] --key [path/of/key file] -pass [password(default:3z6F2Xfc)]
Create multiple p12
for creating multiple p12: pem file, key file and p12 must have the same name
Use -f to overwrite existing p12
- Example if you create test1.p12 test2.P12 …:
In the csv file, you must have test1 test2 …
The pem files must be test1.pem test2.pem …
The key files must be test1.key test2.key …
It will search key files in folder/certificate/csr/
$ cert create-multiple-p12 -c [-f] --pem-folder [path/of/pem folder]
If you want to use an other folder to search key files, add –key-folder:
$ cert create-multiple-p12 -c [-f] --pem-folder [path/of/pem folder] --key-folder [path/of/key folder]
ChangeLog
see changes
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file CertGenerator-2.1.21.tar.gz
.
File metadata
- Download URL: CertGenerator-2.1.21.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b603326fe4d017faeb85978eba0556fda64ac97b246f522b42584aded7cd0e60 |
|
MD5 | 83057fd870fc1c1a2f96a849a79e72b5 |
|
BLAKE2b-256 | 81721efd3e7bbda95344b6ef433a24eaca363165042855c42f68e6afb513ae6d |
File details
Details for the file CertGenerator-2.1.21-py2-none-any.whl
.
File metadata
- Download URL: CertGenerator-2.1.21-py2-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82a05abdaa664f872816f9fc1685e36d6d410888ed7358ea4dc84a2a4ed95c4b |
|
MD5 | ff19e5dd1be41c227404f37167ca5de2 |
|
BLAKE2b-256 | d265fd625f911b0848153b201bff34dde93e45f069052a7de2b33783ed1cbd25 |