curl-library
SegFault on RHEL 4 using 7.18.2
Date: Fri, 22 Aug 2008 11:41:46 -0400
Hi All,
I have been using libcurl for a while and needed to make an application
I wrote non-blocking. So I moved to use the curl multi interface. This
works fine in all cases except when I am connecting to an https site
using a client cert (.pem)
Stack Trace:
#0 0x03a2cae0 in ssl3_undef_enc_method () from /lib/libssl.so.4
#1 0x0078d332 in ssl_create_cipher_list (ssl_method=0x3a2dc80,
cipher_list=0x9b80464, cipher_list_by_id=0x9b80468,
rule_str=0x878737 "ALL:!ADH:+RC4:@STRENGTH") at ssl_ciph.c:849
#2 0x007888a2 in SSL_CTX_new (meth=0x3a2dc80) at ssl_lib.c:1418
#3 0x00dc6891 in Curl_ossl_close_all () from /usr/lib/libcurl.so.4
#4 0x00dc7505 in Curl_ossl_close_all () from /usr/lib/libcurl.so.4
#5 0x00dc7731 in Curl_ossl_connect_nonblocking () from
/usr/lib/libcurl.so.4
#6 0x00ddfbb8 in Curl_ssl_connect_nonblocking () from
/usr/lib/libcurl.so.4
#7 0x00db1b3b in Curl_http_connect () from /usr/lib/libcurl.so.4
#8 0x00db1a66 in Curl_http_connect () from /usr/lib/libcurl.so.4
#9 0x00dc0550 in Curl_protocol_connect () from /usr/lib/libcurl.so.4
#10 0x00dd7ad8 in curl_multi_fdset () from /usr/lib/libcurl.so.4
#11 0x00dd87d6 in curl_multi_perform () from /usr/lib/libcurl.so.4
#12 0x005d37c8 in TestCaseManager::process (this=0xbfe26ab8)
at TestCaseManager.cpp:221
#13 0x005c456c in ApplicationBase::run (this=0xbfe26aa0)
at ApplicationBase.cpp:255
#14 0x0808d5f1 in main (argc=9, argv=0xbfe26c04) at rhapMain.cpp:22
Here are all the options I set:
curl_easy_setopt(mCurlHandle, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(mCurlHandle, CURLOPT_WRITEFUNCTION,
&WebService::writeDataToString);
curl_easy_setopt(mCurlHandle, CURLOPT_WRITEDATA, (void *) this);
curl_easy_setopt(mCurlHandle, CURLOPT_HEADERFUNCTION,
&WebService::writeHeaderToString);
curl_easy_setopt(mCurlHandle, CURLOPT_WRITEHEADER, (void *)
this);
curl_easy_setopt(mCurlHandle, CURLOPT_VERBOSE, 100);
curl_easy_setopt(mCurlHandle, CURLOPT_URL, mURI.c_str());
curl_easy_setopt(mCurlHandle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(mCurlHandle, CURLOPT_UNRESTRICTED_AUTH, 1)
code = curl_easy_setopt(mCurlHandle, CURLOPT_SSL_VERIFYPEER, 0);
code = curl_easy_setopt(mCurlHandle, CURLOPT_SSL_VERIFYHOST, 1);
code = curl_easy_setopt(mCurlHandle, CURLOPT_SSLCERT,
mCertFile.c_str());
curl_easy_setopt(mCurlHandle, CURLOPT_POST, 1);
curl_easy_setopt(mCurlHandle, CURLOPT_POSTFIELDS,
mData.c_str());
curl_easy_setopt(mCurlHandle, CURLOPT_POSTFIELDSIZE,
mData.length());
Here is the debug:
* STATE: INIT => CONNECT handle 0x9b7ee34; (connection #-5000)
* About to connect() to secure-direct.rhapsody.com port 443 (#0)
* Trying 207.188.0.25... * STATE: CONNECT => WAITCONNECT handle
0x9b7ee34; (connection #0)
* Connected to secure-direct.rhapsody.com (207.188.0.25) port 443 (#0)
Note that this same call works fine when not using the multi interface.
Any help on this would be great, thanks
Glenn
Received on 2008-08-22