āļ”āļđāļ‚āđ‰āļ­āļĄāļđāļĨ SSL Certificate āļ”āđ‰āļ§āļĒ CURL

curl -w %{certs} https://your-domain.com --silent -o /dev/null

āļ•āļĢāļ§āļˆāļŠāļ­āļšāļĢāļēāļĒāļĨāļ°āđ€āļ­āļĩāļĒāļ”āđƒāļšāļĢāļąāļšāļĢāļ­āļ‡āļ”āđ‰āļ§āļĒ CURL

curl -v https://example.com 2>&1 | grep -i 'issuer\|subject\|start date\|expire date'
* subject: jurisdictionC=TH; businessCategory=Private Organization; serialNumber=0105564042874; C=TH; ST=Bangkok; L=Bang Kapi District; O=EXTRA CORPORATION CO., LTD.; CN=ireallyhost.com
* start date: Jun 26 00:00:00 2024 GMT
* expire date: Jun 25 23:59:59 2025 GMT
* subjectAltName: host "ireallyhost.com" matched cert's "ireallyhost.com"
* issuer: C=US; O=DigiCert Inc; CN=GeoTrust EV RSA CA G2

āđ€āļĢāļĩāļĒāļāļ”āļđ SSL Certificate āļŠāļģāļŦāļĢāļąāļš Windows / Windows Server (āļ•āđ‰āļ­āļ‡āļ•āļīāļ”āļ•āļąāđ‰āļ‡ CURL)

curl -s -o NUL -w "%{certs}" https://example.com | findstr /R "^-----BEGIN CERTIFICATE----- ^[A-Za-z0-9+/=]*$ ^-----END CERTIFICATE-----"

āđ€āļĢāļĩāļĒāļāļ”āļđ SSL Certificate āļ”āđ‰āļ§āļĒ CURL āļŠāļģāļŦāļĢāļąāļš Linux

If you must use only curl and your curl version is 7.88.0 or newer:

curl -s -o /dev/null -w "%{certs}" https://example.com
curl -v https://example.com 2>&1 | grep -i 'issuer\|subject\|start date\|expire date'

āđ€āļŠāđ‡āļ„āļ§āļąāļ™āļŦāļĄāļ”āļ­āļēāļĒāļļ SSL āļ”āđ‰āļ§āļĒ CURL

curl -w %{certs} https://www.example.com/ --silent -o /dev/null | grep -Ei "^(start|expire) date:" | head -n 2

returns:

Start Date:2024-01-30 00:00:00 GMT
Expire Date:2025-03-01 23:59:59 GMT

curl https://example.com -vI --stderr - | grep "expire date" | cut -d":" -f 2-

returns:

Jan 15 23:59:59 2026 GMT

āļ•āļĢāļ§āļˆāļŠāļ­āļš SSL Version āļ”āđ‰āļ§āļĒ CURL

curl --insecure -vvI https://www.example.com 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }'

Output:

* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=Los Angeles; O=Verizon Digital Media Services, Inc.; CN=www.example.org
*  start date: Dec 10 00:00:00 2021 GMT
*  expire date: Dec  9 23:59:59 2022 GMT
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1
*  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 0x5588e1f5ae30)
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
* Connection #0 to host www.example.com left intact

āļ§āļīāļ˜āļĩāļ­āļ·āđˆāļ™āđ†

  • openssl s_client -showcerts -connect your-domain.com:443
  • https://www.ireallyhost.com/kb/ssl/385
  • https://serverfault.com/questions/661978/

āđ„āļ­āđ€āļĢāļĩāļĒāļĨāļĨāļĩāđˆāđ‚āļŪāļŠ
āļŠāļģāļŦāļĢāļąāļšāļāļēāļĢāļŠāļ™āļąāļšāļŠāļ™āļļāļ™ āđāļĨāļ°āļŠāđˆāļ§āļĒāđ€āļŦāļĨāļ·āļ­
http://www.ireallyhost.com/support

āļ‚āđ‰āļ­āļāļģāļŦāļ™āļ”āđƒāļ™āļāļēāļĢāđ€āļœāļĒāđāļžāļĢāđˆāļšāļ—āļ„āļ§āļēāļĄ āļ‚āđˆāļēāļ§āļŠāļēāļĢ
** āļšāļ—āļ„āļ§āļēāļĄāļ™āļĩāđ‰āļĄāļĩāļĨāļīāļ‚āļŠāļīāļ—āļ˜āļīāđŒ āđ„āļĄāđˆāļ­āļ™āļļāļāļēāļ•āļīāđƒāļŦāđ‰āļ„āļąāļ”āļĨāļ­āļ āļ—āļģāļ‹āđ‰āļģ āļ”āļąāļ”āđāļ›āļĨāļ‡āļāđˆāļ­āļ™āđ„āļ”āđ‰āļĢāļąāļšāļ­āļ™āļļāļāļēāļ• **
āđ‚āļ›āļĢāļ”āļĢāļ°āļšāļļāđāļŦāļĨāđˆāļ‡āļ—āļĩāđˆāļĄāļē āļšāļĢāļīāļĐāļąāļ— āđ€āļ­āđ‡āļāļ‹āđŒāļ•āļĢāđ‰āļē āļ„āļ­āļĢāđŒāļ›āļ­āđ€āļĢāļŠāļąāđˆāļ™ āļˆāļģāļāļąāļ” / https://www.ireallyhost.com
āļ—āļąāđˆāļ§āđ„āļ›
āļ„āļđāđˆāļĄāļ·āļ­ / āļ§āļīāļ˜āļĩāļāļēāļĢāļ•āļīāļ”āļ•āļąāđ‰āļ‡ SSL Certificate āļŠāļģāļŦāļĢāļąāļš cPanel Web Control Panel
āļšāļĢāļīāļāļēāļĢ SSL Certificate - āđ‚āļ”āļĒāđ„āļ­āđ€āļĢāļĩāļĒāļĨāļĨāļĩāđˆāđ‚āļŪāļŠ