用 curl 和 wget 略過 SSL 憑證 – 筆記

2015-06-09 CentOS

每次用 wget 或 curl 遇到 https 都會忘記如何略過,在此紀錄遇到 https 的使用方式

 

curl 檢視 SSL 憑證訊息

$ curl 'https://shazicloud.twbbs.org' --verbose

* About to connect() to shazicloud.twbbs.org port 443 (#0)
*   Trying 220.135.90.193... connected
* Connected to shazicloud.twbbs.org (220.135.90.193) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* Certificate is signed by an untrusted issuer: 'E=shazi7804@gmail.com,CN=shazicloud.twbbs.org,OU=shazi,O=Mr.shazi,L=Taipei,ST=Taiwan,C=TW'
* NSS error -8172
* Closing connection #0
* Peer certificate cannot be authenticated with known CA certificates
curl: (60) Peer certificate cannot be authenticated with known CA certificates
More details here: http://curl.haxx.se/docs/sslcerts.html

 

 

curl 不驗證 https 憑證

$ curl 'https://shazicloud.twbbs.org' -k

 

wget 不驗證 https 憑證

$ wget 'https://shazicloud.twbbs.org' --no-check-certificate

 

給 Mr. 沙先生一點建議

彙整

分類

展開全部 | 收合全部

License

訂閱 Mr. 沙先生 的文章

輸入你的 email 用於訂閱