Mercurial > repos > other > usr-local-bin
view make-certificate @ 29:c2584db4a650
Make load recording more flexible and efficient
* Works with variable number of CPUs
* Use Python `enumerate()` function where possible
* Use long-running NVidia function
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 30 Dec 2020 17:22:29 +0000 |
parents | 86ca8ee7b597 |
children |
line wrap: on
line source
#! /bin/bash set -e if [ $# -ne 1 -a $# -ne 2 ]; then echo "Usage: $0 <key-name> [<alt-name>]" exit 1 fi if [ ! -d ~/Websites/certs/ ]; then echo "~/Websites/certs/ didn't exist - can't create certs" exit 1 fi if [ $# -eq 2 ]; then extra="\nDNS.2=$2" else extra="" fi pushd ~/Websites/certs/ openssl req -nodes -sha256 -new -keyout $1.key -out $1.csr -subj "/C=GB/ST=Worcestershire/O=$1/CN=$1" \ -config <(cat ~/.ssh/CA/openssl.cnf <(echo -e "DNS.1=${1}${extra}")) openssl ca -in $1.csr -out $1.crt -cert ~/.ssh/CA/ca.crt -keyfile ~/.ssh/CA/ca.key -days 365 \ -config <(cat ~/.ssh/CA/openssl.cnf <(echo -e "DNS.1=${1}${extra}")) -batch popd