Skip to content

Commit

Permalink
10 year certificate expiration time
Browse files Browse the repository at this point in the history
  • Loading branch information
lin1810 committed Jun 16, 2023
1 parent 9621dbf commit ba7c81d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker_build/Server/generateCerts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ createCert() { local certName="$1"
fi

if [ ! -f $CERT_PATH/$certName.crt ]; then
openssl x509 -req -CA $CERT_PATH/ca.crt -CAkey $CERT_PATH/ca.key -CAcreateserial -in $CERT_PATH/$certName.csr -out $CERT_PATH/$certName.crt
openssl x509 -req -days 3650 -CA $CERT_PATH/ca.crt -CAkey $CERT_PATH/ca.key -CAcreateserial -in $CERT_PATH/$certName.csr -out $CERT_PATH/$certName.crt
echo generate $CERT_PATH/$certName.crt success
else
echo exist and skip $CERT_PATH/$certName.crt.
Expand Down Expand Up @@ -48,7 +48,7 @@ else
fi

if [ ! -f $CERT_PATH/ca.crt ]; then
openssl x509 -req -in $CERT_PATH/ca.csr -signkey $CERT_PATH/ca.key -out $CERT_PATH/ca.crt
openssl x509 -req -days 3650 -in $CERT_PATH/ca.csr -signkey $CERT_PATH/ca.key -out $CERT_PATH/ca.crt
echo generate $CERT_PATH/ca.crt success
else
echo exist and skip $CERT_PATH/ca.crt.
Expand Down

0 comments on commit ba7c81d

Please sign in to comment.