首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未知SSL协议错误

未知SSL协议错误
EN

Ask Ubuntu用户
提问于 2015-11-23 19:38:10
回答 1查看 4.5K关注 0票数 2

升级到15.10后,我得到了错误35‘未知SSL协议错误连接到.’当我试图使用PHP脚本(PHP5-fpm)的CURL访问SSL安全服务器时。在升级之前一切都很好。知道怎么解决这个问题吗?

代码语言:javascript
复制
apt-cache policy curl
curl:
  Installed: 7.43.0-1ubuntu2
  Candidate: 7.43.0-1ubuntu2
  Version table:
 *** 7.43.0-1ubuntu2 0
        500 http://ua.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status

访问https://w3s.webmoney.ru:443

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2015-11-23 20:11:33

服务器https://w3s.webmoney.ru:443是不可信任的。

代码语言:javascript
复制
% curl https://w3s.webmoney.ru:443
curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

代码语言:javascript
复制
curl --insecure https://w3s.webmoney.ru:443

而且起作用了。

来自man curl

代码语言:javascript
复制
-k, --insecure
    (SSL) This option explicitly allows curl to perform "insecure" SSL
    connections and transfers. All SSL connections are attempted to be
    made secure by using the CA certificate  bundle  installed  by
    default. This makes all connections considered "insecure" fail unless
    -k, --insecure is used.

添加受信任的证书

  1. 将证书的路径添加到/etc/ca-证书.ca使用相对于/usr/share/ca-certificates的路径
  2. 运行sudo update-ca-certificates

请将进一步说明改为man update-ca-certificates

摘自评论意见:

FYI:同一个站点启用了SSLv3和SSLv2 --因为这一点,它很糟糕,根本不值得信任

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/701674

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档