Skip to content

Commit 67bda37

Browse files
committed
Update entrypoint env variable and help text
1 parent f1622e6 commit 67bda37

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

entrypoint.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ openssl s_client -connect "$SERVER:$PORT" -showcerts </dev/null 2>/dev/null | op
1414

1515
# Check certificate hashes to prevent man-in-the-middle attacks
1616
DOWNLOADED_HASH=$(sha256sum /tmp/server_cert.pem | cut -d ' ' -f 1)
17-
if [[ ! -v CERT_SHA256_HASH ]]; then
18-
printf "No certificate hash provided as environment variable CERT_SHA256_HASH\n"
17+
if [[ ! -v SERVER_CERT_SHA256_HASH ]]; then
18+
printf "No certificate hash provided as environment variable SERVER_CERT_SHA256_HASH\n"
1919
printf "This is unsafe! If you want to trust this server certificate, add this hash\n"
2020
printf "into this container's environment:\n"
2121
printf "%s\n" "$DOWNLOADED_HASH"
2222
exit 1
2323
fi
2424

25-
if ! printf "%s /tmp/server_cert.pem\n" "$CERT_SHA256_HASH" | sha1sum --check --status; then
25+
if ! printf "%s /tmp/server_cert.pem\n" "$SERVER_CERT_SHA256_HASH" | sha1sum --check --status; then
2626
printf "Certificate hash failed! The downloaded server certificate has hash:\n"
2727
printf "%s\n" "$DOWNLOADED_HASH"
2828
printf "but this does not match the provided one:"
2929
printf "%s\n" "$CERT_SHA256_HASH"
30-
printf "Update the container environment\n"
31-
printf "variable CERT_SHA256_HASH if you know that the certificate changed!"
30+
printf "Update the container environment variable SERVER_CERT_SHA256_HASH\n"
31+
printf "if you know that the certificate changed!\n"
3232
exit 1
3333
fi
3434

0 commit comments

Comments
 (0)