This sub-folder of the Straypenguins-Tips-Inventory repository provides several simple utility scripts for OpenSSL.
Checks if the given key file and certificate file are a valid pair.
Usage:
cert-pair-check.sh KEYFILE CRTFILE
Generates a private key and a self-signed certificate pair.
Usage:
gen-selfsgncert.sh
No arguments are required.
SSLCONF
variable in the script to point to your custom OpenSSL configuration file, or comment it out to use the system’s default openssl.cnf
.openssl-selfsgn-sample.cnf
demonstrates how to set Subject altName
attributes. To use this file, set its path to SSLCONF
.copy_extensions = copy # in section [CA_default]
subjectAltName = @alt_names # in section [v3_ca]
The [alt_names]
section can remain; it will be ignored if the above options are commented out.