SpartacusIn21

专注:c++,python,d3d,设计模式,人工智能,并行计算

curl报35错误码

一、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 

posted on 2017-09-06 22:16  SpartacusIn21  阅读(15429)  评论(0编辑  收藏  举报

导航