#!/bin/sh # ./genca.sh (configfile) set -e SUPPLEMENTARY_CONFIG="$1" . ./configure.sh # Certificate Authority mkdir -pv "$CA"/ca "$CA"/certs "$CA"/signed echo 1000 > "$CA"/ca/"$CA".serial touch "$CA"/ca/"$CA".idx openssl req -config "$OPENSSL_CONFIG" -new -x509 -days "$EXPIRE" -extensions v3_ca -keyout "$CA"/ca/"$CA".key -out "$CA"/ca/"$CA".crt chmod 600 "$CA"/ca/"$CA".key