curl常用命令
测试证书版本
bash
curl -Iv --tlsv1.0 https://httpsok.com
bash
curl -Iv --tlsv1.1 https://httpsok.com
bash
curl -Iv --tlsv1.2 https://httpsok.com
bash
curl -Iv --tlsv1.3 https://httpsok.com
bash
* About to connect() to httpsok.com port 443 (#0)
* Trying 124.222.171.194...
* Connected to httpsok.com (124.222.171.194) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* NSS error -12190 (SSL_ERROR_PROTOCOL_VERSION_ALERT)
* Peer reports incompatible or unsupported protocol version.
* Closing connection 0
curl: (35) Peer reports incompatible or unsupported protocol version.
bash
* About to connect() to httpsok.com port 443 (#0)
* Trying 124.222.171.194...
* Connected to httpsok.com (124.222.171.194) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
* Server certificate:
* subject: CN=*.httpsok.com
* start date: Dec 10 00:00:00 2024 GMT
* expire date: Mar 10 23:59:59 2025 GMT
* common name: *.httpsok.com
* issuer: CN=ZeroSSL ECC Domain Secure Site CA,O=ZeroSSL,C=AT
> HEAD / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: httpsok.com
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Server: nginx
Server: nginx
< Date: Fri, 20 Dec 2024 08:43:41 GMT
Date: Fri, 20 Dec 2024 08:43:41 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 1304
Content-Length: 1304
< Last-Modified: Wed, 18 Dec 2024 13:49:28 GMT
Last-Modified: Wed, 18 Dec 2024 13:49:28 GMT
< Connection: keep-alive
Connection: keep-alive
< Vary: Accept-Encoding
Vary: Accept-Encoding
< ETag: "6762d2e8-518"
ETag: "6762d2e8-518"
< Strict-Transport-Security: max-age=31536000
Strict-Transport-Security: max-age=31536000
< Accept-Ranges: bytes
Accept-Ranges: bytes
<
* Connection #0 to host httpsok.com left intact