Skip to content

Commit

Permalink
generate ca.crt and openssl.cnf if not provided (#672)
Browse files Browse the repository at this point in the history
* generate ca.crt and openssl.cnf if not provided

* fix filename escape

* fix filename escape
  • Loading branch information
dudizimber committed May 19, 2024
1 parent c3eec28 commit b864f26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/docker/gen-certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ generate_cert() {
}

mkdir -p tls
[ -f tls/ca.key ] || openssl genrsa -out tls/ca.key 4096
openssl req \
[ -f "tls/ca.key" ] || openssl genrsa -out tls/ca.key 4096
[ -f "tls/ca.crt" ] || openssl req \
-x509 -new -nodes -sha256 \
-key tls/ca.key \
-days 3650 \
-subj '/O=Redis Test/CN=Certificate Authority' \
-out tls/ca.crt

cat > tls/openssl.cnf <<_END_
[ -f "tls/openssl.cnf" ] || cat > tls/openssl.cnf <<_END_
[ server_cert ]
keyUsage = digitalSignature, keyEncipherment
nsCertType = server
Expand Down

0 comments on commit b864f26

Please sign in to comment.