ssl certificate if signed certificate in certificate chain curl code example
Example: validate ssl certificate on website using curl
curl --cert-status -v https://www.google.com 2>&1 | awk 'BEGIN { cert=0 } /^\* Server certificate:/ { cert=1 } /^\*/ { if (cert) print }'