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