āļāļđāļāđāļāļĄāļđāļĨ 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
* 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
āļŠāļģāļŦāļĢāļąāļāļāļēāļĢāļŠāļāļąāļāļŠāļāļļāļ āđāļĨāļ°āļāđāļ§āļĒāđāļŦāļĨāļ·āļ
http://www.ireallyhost.com/support
āļāđāļāļāļģāļŦāļāļāđāļāļāļēāļĢāđāļāļĒāđāļāļĢāđāļāļāļāļ§āļēāļĄ āļāđāļēāļ§āļŠāļēāļĢ
** āļāļāļāļ§āļēāļĄāļāļĩāđāļĄāļĩāļĨāļīāļāļŠāļīāļāļāļīāđ āđāļĄāđāļāļāļļāļāļēāļāļīāđāļŦāđāļāļąāļāļĨāļāļ āļāļģāļāđāļģ āļāļąāļāđāļāļĨāļāļāđāļāļāđāļāđāļĢāļąāļāļāļāļļāļāļēāļ **
āđāļāļĢāļāļĢāļ°āļāļļāđāļŦāļĨāđāļāļāļĩāđāļĄāļē āļāļĢāļīāļĐāļąāļ āđāļāđāļāļāđāļāļĢāđāļē āļāļāļĢāđāļāļāđāļĢāļāļąāđāļ āļāļģāļāļąāļ / https://www.ireallyhost.com
** āļāļāļāļ§āļēāļĄāļāļĩāđāļĄāļĩāļĨāļīāļāļŠāļīāļāļāļīāđ āđāļĄāđāļāļāļļāļāļēāļāļīāđāļŦāđāļāļąāļāļĨāļāļ āļāļģāļāđāļģ āļāļąāļāđāļāļĨāļāļāđāļāļāđāļāđāļĢāļąāļāļāļāļļāļāļēāļ **
āđāļāļĢāļāļĢāļ°āļāļļāđāļŦāļĨāđāļāļāļĩāđāļĄāļē āļāļĢāļīāļĐāļąāļ āđāļāđāļāļāđāļāļĢāđāļē āļāļāļĢāđāļāļāđāļĢāļāļąāđāļ āļāļģāļāļąāļ / https://www.ireallyhost.com
āļāļąāđāļ§āđāļ
āļāļđāđāļĄāļ·āļ / āļ§āļīāļāļĩāļāļēāļĢāļāļīāļāļāļąāđāļ SSL Certificate āļŠāļģāļŦāļĢāļąāļ cPanel Web Control Panel
āļāļĢāļīāļāļēāļĢ SSL Certificate - āđāļāļĒāđāļāđāļĢāļĩāļĒāļĨāļĨāļĩāđāđāļŪāļŠ