From 7ee30014420015a517d4e8d5d32aafd4e5a2faec Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Tue, 9 Aug 2022 05:43:12 -0700 Subject: [PATCH] [bitnami/redis] fix: only check passphrase file if set (#1062) fix: only check passphrase file if set If the REDIS_TLS_KEY_FILE_PASS environment variable is not set, do not check to see if that file exists and do not configure it. Signed-off-by: Travis Raines <571832+rainest@users.noreply.github.com> Co-authored-by: Fran Mulero --- .../redis/6.2/debian-11/rootfs/opt/bitnami/scripts/libredis.sh | 3 +++ .../redis/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bitnami/redis/6.2/debian-11/rootfs/opt/bitnami/scripts/libredis.sh b/bitnami/redis/6.2/debian-11/rootfs/opt/bitnami/scripts/libredis.sh index 7fc388b20d60..8751f23cde97 100644 --- a/bitnami/redis/6.2/debian-11/rootfs/opt/bitnami/scripts/libredis.sh +++ b/bitnami/redis/6.2/debian-11/rootfs/opt/bitnami/scripts/libredis.sh @@ -220,6 +220,9 @@ redis_validate() { elif [[ ! -f "$REDIS_TLS_KEY_FILE" ]]; then print_validation_error "The private key file in the specified path ${REDIS_TLS_KEY_FILE} does not exist" fi + if [[ -n "$REDIS_TLS_KEY_FILE_PASS" ]] && [[ ! -f "$REDIS_TLS_KEY_FILE_PASS" ]]; then + print_validation_error "The passphrase for the private key file in the specified path ${REDIS_TLS_KEY_FILE_PASS} does not exist" + fi if [[ -z "$REDIS_TLS_CA_FILE" ]]; then print_validation_error "You must provide a CA X.509 certificate in order to use TLS" elif [[ ! -f "$REDIS_TLS_CA_FILE" ]]; then diff --git a/bitnami/redis/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh b/bitnami/redis/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh index 7fc388b20d60..8751f23cde97 100644 --- a/bitnami/redis/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh +++ b/bitnami/redis/7.0/debian-11/rootfs/opt/bitnami/scripts/libredis.sh @@ -220,6 +220,9 @@ redis_validate() { elif [[ ! -f "$REDIS_TLS_KEY_FILE" ]]; then print_validation_error "The private key file in the specified path ${REDIS_TLS_KEY_FILE} does not exist" fi + if [[ -n "$REDIS_TLS_KEY_FILE_PASS" ]] && [[ ! -f "$REDIS_TLS_KEY_FILE_PASS" ]]; then + print_validation_error "The passphrase for the private key file in the specified path ${REDIS_TLS_KEY_FILE_PASS} does not exist" + fi if [[ -z "$REDIS_TLS_CA_FILE" ]]; then print_validation_error "You must provide a CA X.509 certificate in order to use TLS" elif [[ ! -f "$REDIS_TLS_CA_FILE" ]]; then