CURLpp:TLS 握手错误
这个问题类似于另一个一个,关于pyCURL
我发送帖子时出现以下错误使用 CURLpp 请求安全网址 https://stackoverflow.com/questions/1942719/pycurl-tls-handshake-error
好的,所以根据 上一个问题,我应该将 libcurl 与 openSSL 一起使用。如果我运行curl -v,我会得到:
curl 7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn /1.15 协议: tftp ftp telnet dict ldap ldaps http 文件 https ftps 功能:GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
所以我应该使用 openSSL,而不是看到 gnuTLS。因此,如果我尝试直接使用命令行通过curl 发送完全相同的请求,它工作正常,并且我在命令输出中看到了我期望的结果。
所以事实证明,当我切换到 CURLpp 时,它使用 gnuTLS,而不是 openSSL。 为了指定我想要带有 CURLpp 的 openSSL ,我是否需要配置一些东西?
This question is similar to another one, concerning pyCURL
I have the following error when I send a post request to a secure url, using CURLpp https://stackoverflow.com/questions/1942719/pycurl-tls-handshake-error
Ok, so according to the answer to the previous question, I should use libcurl with openSSL. If I run curl -v
, I get this:
curl 7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
So I should be using openSSL, and not see gnuTLS. So if I try to send the very same request through curl directly with the command line, it works fine, and I see on the command output the result I am expecting.
So It turns out when I switch to CURLpp, it uses gnuTLS, instead of openSSL.
Is there something I have to configure, in order to specify I want openSSL with CURLpp ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
cURLpp 只是 libcURL 的包装器,它并不规定 libcURL 使用哪种 SSL 实现。
我不太确定你是如何得出
当我切换到 CURLpp 时,它使用 gnuTLS,而不是 openSSL
的结论,但我怀疑你安装了多个 libcurl.so,一个是curl 使用的,另一个是您的应用程序正在使用(通过 cURLpp)。作为旁注,收到的
TLS致命警报...
(在链接的问题中提到)可能是服务器端配置错误的结果(无效的服务器名TLS扩展) 、协商密码失败等)。cURLpp is just a wrapper over libcURL, it doesn't dictate which SSL implementation libcURL uses.
Am not exactly sure how you've come to the
when I switch to CURLpp, it uses gnuTLS, instead of openSSL
conclusion but I suspect that you have multiple libcurl.so installed, the one curl uses and another that your app is using (via cURLpp).As a side note, the
TLS fatal alert ... received
(mentioned in the linked question) was probably a result of a misconfiguration on the server side (invalid servername TLS extension, failure to negotiate ciphers, etc).