无法获取cURL或wget来validation某些SSL证书

我注意到我们的链接检查器,使用cURL,越来越经常validationSSL证书。 我正在试图弄清楚这一点。

例如, https: //www.bgetem.de/在我的Windows 7机器上的每个浏览器(IE 11,Firefox,Opera,Chrome)上都可以正常打开,但是我的CentOS 6和Ubuntu 16.04上的cURL(和wget)不能validation证书。

这里是cURL从CentOS的详细输出(版本curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2

 * About to connect() to www.bgetem.de port 443 (#0) * Trying 193.104.3.166... connected * Connected to www.bgetem.de (193.104.3.166) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * Peer's certificate issuer is not recognized: 'CN=COMODO RSA Domain Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB' * NSS error -8179 * Closing connection #0 * Peer certificate cannot be authenticated with known CA certificates 

和Ubuntu(版本curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3 ):

 * found 173 certificates in /etc/ssl/certs/ca-certificates.crt * found 695 certificates in /etc/ssl/certs * ALPN, offering http/1.1 * SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384 * server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none * Closing connection 0 curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none 

任何想法是什么问题,以及如何解决它?

由于错误消息已经解释:服务器证书无法使用来自CAfile的已知CA证书进行validation: /etc/pki/tls/certs/ca-bundle.crt (因为服务器证书由系统未知的CA颁发)。

两个相当普遍的原因,这样的消息:

  • 证书实际上由未知的CA(例如内部CA)签名。
  • 证书使用来自其中一个知名CA的中间CA证书进行签名,远程服务器的configuration错误在于它不包含该中间CA证书作为其响应的CA链。

感谢您提供域名:允许我们testingSSL服务器并确认:CA链不完整:

在这里输入图像说明

作为该服务器的pipe理员,您可以/应该修复链文件以防止authenticationpath中的“额外下载”部分。

如果您不是该服务器的pipe理员,并且想要修复该客户端:自己下载该中间证书 并将其添加到本地信任存储区 。