#!/bin/bash echo "Create $1 Server" openssl genpkey -algorithm EC -out $1.key -pkeyopt ec_paramgen_curve:P-384 -pkeyopt ec_param_enc:named_curve openssl req -new -config host.conf -key $1.key -out $1.csr openssl x509 -req -days 730 -in $1.csr -out $1.crt -extfile host.conf -extensions v3_ext \ -CAkey $2 -CA $3 -CAcreateserial openssl ec -in $1.key -pubout -out $1.pub openssl x509 -in $1.crt -text -pubkey -noout cat $1.pub cat $1.crt $3 > fullchain.pem