blob: eec3077daf8617ad5651775fd8d7a7ce94f998c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/bash
if [ ! -f ./private.key ]
then
openssl genrsa -out private.key 3072
fi
openssl req \
-batch \
-new -x509 \
-key private.key \
-sha256 \
-out cert.pem \
-days 9999 \
-config ./openssl.cnf
openssl x509 -in cert.pem -text -noout
cat ./private.key ./cert.pem > testcert.pem
rm ./private.key ./cert.pem
|