NAME
ronin-cert-gen - Generates a new X509 certificate
SYNOPSIS
ronin cert-gen [options]
DESCRIPTION
Generates a new X509 certificate.
OPTIONS
--versionNUM- The certificate version number Defaults to
2if not given. --serialNUM- The certificate serial number Defaults to
0if not given. --not-beforeTIME- When the certificate becomes valid. Defaults to the current time.
--not-afterTIME- When the certificate becomes no longer valid. Defaults to one year from now.
-c,--common-nameDOMAIN- The Common Name (CN) for the certificate.
-A,--subject-alt-nameHOST|IP- Adds HOST or IP to
subjectAltName. -O,--organizationNAME- The Organization (O) for the certificate.
-U,--organizational-unitNAME- The Organizational Unit (OU).
-L,--localityNAME- The locality for the certificate.
-S,--stateXX- The two-letter State (ST) code for the certificate.
-C,--countryXX- The two-letter Country (C) code for the certificate.
-t,--key-typersa\|dsa\|ec`- The signing key type.
--generate-keyPATH- Generates and saves a random key. Defaults to
key.pemif not given. -k,--key-fileFILE- Loads the signing key from the FILE.
-H,--signing-hashsha256|sha1|md5- The hash algorithm to use for signing. Defaults to
sha256if not given. --ca-keyFILE- The Certificate Authority (CA) key.
--ca-certFILE- The Certificate Authority (CA) certificate.
--ca- Generates a CA certificate.
-o,--outputFILE- The output file to save the generated certificate to. Defaults to
cert.crtif not given. -h,--help- Print help information.
EXAMPLES
Generates self-signed certificate in cert.crt and a new private key in key.pem:
$ ronin cert-gen -c test.com -O "Test Co" -U "Test Dept" \
-L "Test City" -S NY -C US
Generates a new self-signed certificate for test.com in cert.crt using the private key in
private.key:
$ ronin cert-gen -c test.com -O "Test Co" -U "Test Dept" \
-L "Test City" -S NY -C US \
--key-file private.key
Generates a new self-signed certificate with a alternative name www.test.com:
$ ronin cert-gen -c test.com -A www.test.com -O "Test Co" -U "Test Dept" \
-L "Test City" -S NY -C US
Generates a new CA certificate which can sign other certificates:
$ ronin cert-gen --ca -c "Test CA" -O "Test Co" -U "Test Dept" \
-L "Test City" -S NY -C US
Generates a new sub-certificate using the CA certificate ca.crt and signing key ca.key:
$ ronin cert-gen -c test.com -O "Test Co" -U "Test Dept" \
-L "Test City" -S NY -C US \
--ca-key ca.key --ca-cert ca.crt
AUTHOR
Postmodern postmodern.mod3@gmail.com