简体   繁体   English

CURLpp:TLS握手错误

[英]CURLpp: TLS Handshake Error

This question is similar to another one, concerning pyCURL 这个问题类似于另一个,关于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 使用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. 好的,所以根据上一个问题的答案,我应该将libcurl与openSSL一起使用。 If I run curl -v , I get this: 如果我运行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 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. 所以我应该使用openSSL,而不是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. 因此,如果我尝试直接通过curl通过命令行发送完全相同的请求,则它可以正常工作,并且我在命令输出中看到了期望的结果。

So It turns out when I switch to CURLpp, it uses gnuTLS, instead of openSSL. 所以事实证明,当我切换到CURLpp时,它使用gnuTLS而不是openSSL。 Is there something I have to configure, in order to specify I want openSSL with CURLpp ? 我必须配置一些东西,以指定我想要带有CURLpp的openSSL吗?

cURLpp is just a wrapper over libcURL, it doesn't dictate which SSL implementation libcURL uses. cURLpp只是libcURL的包装,它并没有规定libcURL使用哪种SSL实现。
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). when I switch to CURLpp, it uses gnuTLS, instead of openSSL结论,但是我怀疑您安装了多个libcurl.so,一个curl使用了另一个curl,而您的应用程序正在使用另一个(通过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). 附带说明, TLS fatal alert ... receivedTLS fatal alert ... received (在链接的问题中提到)可能是服务器端配置错误(无效的服务器名TLS扩展名,无法协商密码等)导致的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM