This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Generate a self-signed x509 certificate or certificate signing request and | |
# key using OpenSSL. DNS and IP addresses can be added as subjectAltName | |
# entries. | |
# | |
# Usage: | |
# ./gencert.sh <common name (or DNS name)> <DNS names or ip addresses...> [--rsa4096] [--csr] | |
# | |
# By default, a 2048 bits RSA key is generated. Supply --rsa4096 at the end to | |
# generate a 4096 bits key. |