From bda2d2da55395614d6f9a80916a725c11ab85692 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 12 Nov 2023 21:18:52 -0600 Subject: [PATCH] Update certs.inc --- inc/certs.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inc/certs.inc b/inc/certs.inc index ccd19ef7..bb0d3320 100755 --- a/inc/certs.inc +++ b/inc/certs.inc @@ -200,7 +200,8 @@ LISTCERTS(){ cw=30; c=0; spc2=''; until [ $c = ${cw} ]; do spc2="${spc2} "; c=`expr $c + 1`; done - ssldir=$(${NCMD} find ${NM_CERTPATH}/live/* -type d) + ssldir=$(${NCMD} find ${NM_CERTPATH}/live/*dns* -type d) + i=0 for certdir in ${ssldir[@]}; do SUBJECT=$(${NCMD} openssl x509 -in ${certdir}/cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV) SUBJECTNAMES=$(${NCMD} openssl x509 -in ${certdir}/cert.pem -noout -text|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV) @@ -236,7 +237,13 @@ LISTCERTS(){ fi DIVIDER false darkGray 120 + + CERTLIST[${i}]=${SUBJECT} + i=`expr $i + 1` done + + echo "HERE: ${CERTLIST[2]}" + echo if [ -z $action ] || [ "${action}" = "gui" ]; then DIVIDER true