2

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 ?

4

1 に答える 1

1

cURLpp は libcURL の単なるラッパーであり、libcURL が使用する SSL 実装を指定しません。
どのようにしてwhen I switch to CURLpp, it uses gnuTLS, instead of openSSL結論に達したのか正確にはわかりませんが、複数の libcurl.so がインストールされていると思われます.1つはcurlが使用し、もう1つはアプリが使用しています(cURLpp経由)。

補足として、TLS fatal alert ... received(リンクされた質問で言及されている)はおそらくサーバー側の設定ミスの結果でした(無効なサーバー名TLS拡張、暗号のネゴシエーションの失敗など)。

于 2010-12-07T21:10:06.790 に答える