[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 <fmulero@vmware.com>
This commit is contained in:
Travis Raines
2022-08-09 14:43:12 +02:00
committed by GitHub
co-authored by Fran Mulero
parent 2c4a49b935
commit 7ee3001442
2 changed files with 6 additions and 0 deletions
@@ -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
@@ -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