cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Getting error CURLE_SSL_CONNECT_ERROR intermittently

From: Raul Carolus <rcarolus_at_lightyeardt.com>
Date: Thu, 23 Feb 2006 07:15:09 -0600

This only seems to happen when I set CURLOPT_DEBUGFUNCTION. If I do not
set a debug function, the error does not occur.

-Raul

Raul Carolus wrote:
> I'm creating Windows c/c++ project compiled into a dll, and am using
> libcurl 7.14, with openssl. This dll is used by another development
> environment for external procedure calls.
>
> I recently added a feature that starts a new thread for a process that
> queries a website for information, to do a neat "behind the scenes"
> feature. However, since adding this, I get this error.
>
> The new thread function uses the easy functions for communications, and
> it uses a local copy of a CURL structure. Here's basically what I do:
>
> my_thread_funciton {
> CURL * myCurl = NULL;
>
> myCurl = curl_easy_init();
> curl_easy_setopt(myCurl, ...);
> (I set CURLOPT_URL, NOPROGRESS=1, COOKIE, WRITEFUNCTION, WRITEDATA,
> HEADERDATA, SSL_VERIFYPEER = FALSE, ERRORBUFFER, POST=1, POSTFIELDS,
> POSTFIELDSIZE)
> curl_easy_perform(myCurl);
> }
>
> The error text returns: "SSL: couldn't set callback!"
>
> Doing a search in the code, this occurs in libcurl in ssluse.c, at or
> around line 1171.
>
> I did some research and saw that a callback function needed to be
> defined for multithreaded programs that use openssl. So I did this
> using some examples as guidelines. However, this had no effect on the
> error.
>
> The strange part, if I try my other, non-threaded calls that use curl, I
> get this same error. Those methods were working fine before.
>
> To make matters even stranger, I created a test program in the other dev
> environment to test this out. When I call the threaded method using
> this test program, it works fine. But if I take the exact same dll and
> move it to the real program, The same call gives me the above error.
>
> What causes this error? Is there a way around it?
>
> Thanks,
>

-- 
Raul Carolus
Lightyear Dealer Technologies
800-499-1914 x119
rcarolus_at_lightyeardt.com
Received on 2006-02-23