Mik*_*.K. 7 server security ssl certificates curl
我在农场中有一台服务器突然无法正确处理 SSL 证书。尝试执行类似 curl 命令的curl -v https://google.com结果是:
curl -v https://google.com
* About to connect() to google.com port 443 (#0)
* Trying 74.125.137.101... connected
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS alert, Server hello (2):
* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Run Code Online (Sandbox Code Playgroud)
使用openssl s_client稍微详细一点。
# openssl s_client -host google.com -port 443
CONNECTED(00000003)
depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
Run Code Online (Sandbox Code Playgroud)
重新安装ca-certificates- 根据aptitude,已经拥有最新的可用版本Version: 20130906ubuntu0.12.04.1。
重新配置ca-certificates通过dpkg-reconfigure。这似乎重新散列了/etc/ssl/certs文件夹,但对问题没有影响。
使用update-ca-certificates --fresh再生该文件夹中的符号链接
curl.haxx.se通过将 .pem 文件放入/etc/ssl/certs并运行更新命令,从中获取最新的 Mozilla ca 包。
该证书curl声称无法找到确实是在证书路径。
# ls -l /etc/ssl/certs/*Geo*
lrwxrwxrwx 1 root root 57 Apr 7 15:57 /etc/ssl/certs/GeoTrust_Global_CA.pem -> /usr/share/ca-certificates/mozilla/GeoTrust_Global_CA.crt
...
Run Code Online (Sandbox Code Playgroud)
引用的证书文件与我网络上的所有其他框具有相同的权限,即 644。
# ls -l /usr/share/ca-certificates/mozilla/GeoTrust_Global_CA.crt
-rw-r--r-- 1 root root 1216 Feb 20 11:49 /usr/share/ca-certificates/mozilla/GeoTrust_Global_CA.crt
Run Code Online (Sandbox Code Playgroud)
其他安全站点(例如 Github)显示不同证书的相同问题。我正在运行的所有可用的软件包在Ubuntu 12.04.4,包括绝对最新版本curl,openssl以及ca-certificates。
这里发生了什么?
| 归档时间: |
|
| 查看次数: |
10244 次 |
| 最近记录: |