From 742624e882288792856ebb121b9225594231e642 Mon Sep 17 00:00:00 2001 From: Ruben Vargas Date: Wed, 8 Nov 2023 19:07:01 -0600 Subject: [PATCH] Regenerate ES certificated when is close to 1 day for expire Signed-off-by: Ruben Vargas --- scripts/cert_generation.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cert_generation.sh b/scripts/cert_generation.sh index 2b446f8ff..c83fd5fe6 100644 --- a/scripts/cert_generation.sh +++ b/scripts/cert_generation.sh @@ -20,7 +20,7 @@ function init_cert_files() { } function generate_signing_ca() { - if [ ! -f ${WORKING_DIR}/ca.crt ] || [ ! -f ${WORKING_DIR}/ca.key ] || ! openssl x509 -checkend 0 -noout -in ${WORKING_DIR}/ca.crt; then + if [ ! -f ${WORKING_DIR}/ca.crt ] || [ ! -f ${WORKING_DIR}/ca.key ] || ! openssl x509 -checkend 1 -noout -in ${WORKING_DIR}/ca.crt; then openssl req -x509 \ -new \ -newkey rsa:4096 \ @@ -197,7 +197,7 @@ function generate_certs() { REGENERATE_NEEDED=$? fi - if [ $REGENERATE_NEEDED = 1 ] || [ ! -f ${WORKING_DIR}/${component}.crt ] || ! openssl x509 -checkend 0 -noout -in ${WORKING_DIR}/${component}.crt; then + if [ $REGENERATE_NEEDED = 1 ] || [ ! -f ${WORKING_DIR}/${component}.crt ] || ! openssl x509 -checkend 1 -noout -in ${WORKING_DIR}/${component}.crt; then generate_cert_config $component $extensions generate_request $component sign_cert $component