#!/bin/bash echo "Create $1 ICA" openssl genpkey -algorithm EC -out $1.key -pkeyopt ec_paramgen_curve:P-384 -pkeyopt ec_param_enc:named_curve openssl req -new -config ica.conf -key $1.key -out $1.csr openssl x509 -req -days 730 -in $1.csr -out $1.crt -extfile ../rootca/rootca.conf -extensions v3_intermediate_ca \ -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