Check SSL certificate information
curl --insecure -vvI https://www.google.com 2>&1 | \
awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }'
# The output will be something like this:
* SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=California; L=Mountain View; O=Google LLC; CN=www.google.com
* start date: Oct 6 06:41:20 2020 GMT
* expire date: Dec 29 06:41:20 2020 GMT
* issuer: C=US; O=Google Trust Services; CN=GTS CA 1O1
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7fa5d100be00)
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
* Connection #0 to host www.google.com left intact
* Closing connection 0