Skip to content

OpenSSL ​

Get CommonName from X509 cert ​

HOSTNAME=wiki.dsync89.com:443
openssl s_client -connect ${HOSTNAME} 2>/dev/null | openssl x5
09 -noout -subject | awk -F= '/^subject/ {print $NF}'