Update certs.inc

This commit is contained in:
2023-11-13 07:37:59 -06:00
parent b29db72b8b
commit c29d35983b

View File

@@ -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)