Pergunta

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 ?

Foi útil?

Solução

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).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top