curl经常报error 35

请问一下是什么原因导致的,怎么解决

阅读 7k
3 个回答

看错误是 SSL 的问题。

你可以尝试升级一下 curlopenssl

CURL ERRNO 35(SSL CONNECT ERROR)

解决方案:升级 nss(Mozilla Network Security Services 网络安全服务)

yum update nss

重启PHP

参考:https://serverfault.com/quest...

一、curl常见schannel错误

schannel: SNI or certificate check failed: SEC_E_WRONG_PRINCIPAL<0x80090322>
该错误主要原因是服务端使用了SNI技术(就是在同一台服务器配置了多个安全证书),而xp不支持SNI,所以xp在访问https接口时,如果服务器默认的第一个证书跟https请求证书不一致,就会导致证书验证失败。

schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed). More detail may be available in the Windows System event log.
该错误主要原因是xp支持的ssl/tls算法较老,导致握手失败。

二、解决方案

使用libcurl+openssl替代libcurl+winssl,具体参考使用curl,libcurl访问Https 。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题