From e8cbf1a6996118c356a830ad7af61ca772a87329 Mon Sep 17 00:00:00 2001 From: Jonathon Rossi Date: Tue, 18 Aug 2015 17:15:17 +1000 Subject: [PATCH] Fix subject alternative name on darwin --- testssl.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testssl.sh b/testssl.sh index fec9fbc..767030f 100755 --- a/testssl.sh +++ b/testssl.sh @@ -1786,12 +1786,11 @@ run_server_defaults() { fi sans=$($OPENSSL x509 -in $HOSTCERT -noout -text | grep -A3 "Subject Alternative Name" | grep "DNS:" | \ - sed -e 's/DNS://g' -e 's/ //g' -e 's/,/\n/g' -e 's/othername://g') -# ^^^ CACert + sed -e 's/DNS://g' -e 's/ //g' -e 's/,/ /g' -e 's/othername://g') +# ^^^ CACert pr_bold " subjectAltName (SAN) " if [ -n "$sans" ]; then - sans=$(echo "$sans" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g') # replace line feed by " " for san in $sans; do out "$underline$san$off " done