我最近購買了 SSL 憑證(positiveSSL)。
我配置了 NGINX 來使用它。
我可以訪問 https:// 版本的網站,Chrome 聲明該證書「有效且受信任」。
然而,命令列程序的說法恰恰相反。如果我在伺服器上或從單獨的主機呼叫命令,就會發生這些問題。這些命令是從 Ubuntu 的更新版本中呼叫的。
獲取
# wget https://example.com
ERROR: The certificate of ‘example.com’ is not trusted.
ERROR: The certificate of ‘example.com’ doesn't have a known issuer.
wget
在伺服器上運行時,錯誤訊息為:
ERROR: cannot verify example.com's certificate, issued by ‘CN=Sectigo RSA Domain Validation Secure Server CA,O=Sectigo Limited,L=Salford,ST=Greater Manchester,C=GB’:
Unable to locally verify the issuer's authority.
連結
“伺服器 example.com 沒有有效的憑證。您仍想連接到它嗎?”
山貓
“SSL 錯誤:憑證不受信任。憑證授權單位未知。-繼續嗎?(n)”
捲曲
root@example:/etc/nginx# curl -I https://example.com
curl: (60) SSL certificate problem: unable to get local issuer certificate```
How can I get these command line programs to trust the certificate?