16 lines
427 B
Bash
16 lines
427 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
echo "Create $1 Host"
|
||
|
|
||
|
openssl genpkey -algorithm EC -out $1.key -pkeyopt ec_paramgen_curve:P-384 -pkeyopt ec_param_enc:named_curve
|
||
|
|
||
|
openssl req -x509 -new -days 730 -key $1.key -out $1.crt -config rootca.conf
|
||
|
|
||
|
openssl ec -in $1.key -pubout -out $1.pub
|
||
|
|
||
|
openssl x509 -in $1.crt -text -pubkey -noout
|
||
|
|
||
|
cat $1.pub
|
||
|
|
||
|
|
||
|
# openssl req -x509 -days 3650 -new -key ${CANAME}.key -out ${CANAME}.crt -config rootca_openssl.conf
|