From 30434a70d863474c8b0f771e01297720029a86c6 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 12 Oct 2017 18:20:49 +0200 Subject: [PATCH] evoacme: csr verification is a different function call --- evoacme/files/evoacme.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/evoacme/files/evoacme.sh b/evoacme/files/evoacme.sh index 35593bb9..a72408ab 100755 --- a/evoacme/files/evoacme.sh +++ b/evoacme/files/evoacme.sh @@ -50,15 +50,13 @@ sed_cert_path_for_nginx() { } x509_verify() { - file=$1 - - ${OPENSSL_BIN} x509 -noout -modulus -in "${file}" >/dev/null + ${OPENSSL_BIN} x509 -noout -modulus -in "$1" >/dev/null +} +csr_verify() { + ${OPENSSL_BIN} req -noout -modulus -in "$1" >/dev/null } - x509_enddate() { - file=$1 - - ${OPENSSL_BIN} x509 -noout -enddate -in "${file}" + ${OPENSSL_BIN} x509 -noout -enddate -in "$1" } main() { @@ -106,7 +104,7 @@ main() { [ ! -f "${CSR_FILE}" ] && error "${CSR_FILE} absent" [ ! -r "${CSR_FILE}" ] && error "${CSR_FILE} is not readable" - x509_verify "${CSR_FILE}" || error "${CSR_FILE} is invalid" + csr_verify "${CSR_FILE}" || error "${CSR_FILE} is invalid" # Hook for evoadmin-web in cluster mode : check master status evoadmin_state_file="/home/${VHOST}/state"