From c29d35983b01c289f2c1e2659ce35ef6588da85e Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 13 Nov 2023 07:37:59 -0600 Subject: [PATCH] Update certs.inc --- inc/certs.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/certs.inc b/inc/certs.inc index 276799be..9686b22c 100755 --- a/inc/certs.inc +++ b/inc/certs.inc @@ -300,7 +300,7 @@ LISTCERTS(){ [ "${SEARCH}" != "0" ] && LISTCERTS -edit -search ${SEARCH} || LISTCERTS -edit exit 0 - elif [ "${CERTLIST[${certid}]}" != "" ]; then + elif [ "${certid}" != "" ] && [ "${CERTLIST[${certid}]}" != "" ]; then cert=${CERTLIST[${certid}]} certdir=${NM_CERTPATH}/live/${cert} SUBJECT=$(${NCMD} openssl x509 -in ${certdir}/cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)