linux - "CURLE_SSL_CONNECT_ERROR (35)"错误寻求解决方法
伊谢尔伦
伊谢尔伦 2017-04-17 11:40:37
[Linux讨论组]

使用手册对这个错误值的解释是这样的:

CURLE_SSL_CONNECT_ERROR (35)

    A problem occured somewhere in the SSL/TLS handshake. You really want 
    the error buffer and read the message there as it pinpoints the problem 
    slightly more. Could be certificates (file formats, paths, permissions), 
    passwords, and others.

主要有如下一些问题:

  • 对于排查这个错误有什么建议?
  • 如果曾遇到过这样的问题,最后又是怎么解决的?
  • 以上所指的paths,默认值是哪个路径,如果要修改的话,怎么修改?

想迫切了解一下第三点,因为所使用的嵌入式文件系统为只读,如果牵扯到修改文件之类的,那必然是失败的。(备注:这一问我从Meteor处得到了答案,CApath: /etc/ssl/certs是Linux环境下的默认路径)在哪个源文件可以更改这个默认的配置路径?(这里有更改CApath路径的接口介绍)

ssl连接的时候,又出现了状况:

* error:10067066:elliptic curve routines:ec_GFp_simple_oct2point:invalid encoding

以下是查找到的一些资料:

PHP 用CURL 在nginx 下面 模拟登陆 HTTPS失败,CURLE_SSL_CONNECT_ERROR(35)
Curl with DER certificates format when verifypeer is enabled
curl strange error
curl ssl problems #23
Issue 235: Problems using encrypted connection to s3
Issue 257: Issue with newer versions of curl and s3fs
Issue 343: 1.7 having curl 35 + other disconnect issue
3 Common Causes of Unknown SSL Protocol Errors with cURL

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

全部回复(2)
天蓬老师

傻乎乎的去跟踪代码,结果发现是编译openssl的方法不正确!

大家讲道理

这里面可以包括被GFW墙掉的吧.
比如Facebook

PS C:\Users\meteor> curl -v https://www.facebook.com
* About to connect() to www.facebook.com port 443 (#0)
*   Trying 31.13.64.129... connected
* Connected to www.facebook.com (31.13.64.129) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:\Windows\system32\curl-ca-bundle.crt
  CApath: none
* Unknown SSL protocol error in connection to www.facebook.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to www.facebook.com:443
PS C:\Users\meteor>

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号