You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gophi/generate_cert.sh

12 lines
311 B
Bash

#!/bin/sh
[ $# -ne 1 ] && {
echo "Usage: ${0} <hostname>"
exit 1
}
echo "Generating TLS cert + privkey for: ${1}"
openssl req -x509 -newkey rsa:4096 -sha256 \
-days 365 -nodes -keyout "${1}.key" \
-out "${1}.crt" -subj "/CN=${1}" \
-addext "subjectAltName=DNS:${1}"