cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3564730 ] SSL handshake sometimes falls in Release

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 02 Nov 2012 02:12:21 -0700

Bugs item #3564730, was opened at 2012-09-04 08:12
Message generated for change (Settings changed) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3564730&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SSL/TLS
Group: bad behaviour
>Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Aryeh Trainin (aryeht)
Assigned to: Daniel Stenberg (bagder)
Summary: SSL handshake sometimes falls in Release

Initial Comment:
I use libcurl 7.25.0 on Windows 7 with SSL support (SSL version: 1.0.1b), as a DLL.
All libcurl calls are in a single DLL that implements communication with a 3rd party device via HTTPS.
The SSL handshake is roughly as follows:

CURL* m_pCurlInstance = curl_easy_init();
struct curl_httppost *post_first = NULL, *post_last = NULL;
CURLcode cc = curl_easy_setopt(m_pCurlInstance, CURLOPT_SSL_VERIFYPEER, 0);
sprintf_s(sWR, "https://%s\n", szAddress); // certain address
cc = curl_easy_setopt(m_pCurlInstance, CURLOPT_URL, sWR);
CURLFORMcode cfc = curl_formadd(&post_first, &post_last, CURLFORM_COPYNAME, "password-input", CURLFORM_COPYCONTENTS, "password", CURLFORM_END);
cc = curl_easy_perform(m_pCurlInstance);

Normally, this works good, except a certain application on a certain PC in Release configuration. The call of curl_easy_perform() produces Error 35 there, and the error buffer is, merely, "SSL connect error".
The same application runs well in the same environment in Debug, as well as on another PC in Release; also, another application that uses the same DLL in a similar way runs in Release on the same PC without any problem.

I've managed to cope with this issue when I built the libcurl DLL with debug info (that is, in the "DLL Release" configuration of vc6libcurl project I added /Zi and /DEBUG keys).
Please comment on this issue. I'm not sure that the above solution is generic and reliable.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2012-09-14 06:47

Message:
No thanks, I will not attempt to debug your program. Not only because I
don't use or run Windows but also because fixing your problems is your
work.

I do however want to help you find the libcurl problem and then I need you
to narrow things down properly so that we can repeat the problem and debug
things in our end. Additionally, if you cannot reproduce the problems in a
stand-alone program it just further hints to me that the bug is residing in
your application code (or environment/network/server etc) and not in
libcurl.

----------------------------------------------------------------------

Comment By: Aryeh Trainin (aryeht)
Date: 2012-09-14 06:36

Message:
I don't believe that a stand-alone code sample would help: the matter is
that the same application on another PC runs OK, as well as another
application (a lighter one) with the same code on the same PC runs OK.
Please notice that this PC is weak (e.g., just 1 GB of RAM), and the
application is heavy and performing a number of communications via sockets
sumiltaneously (one of them is via cURL, others are not).
So far, the libcurl compiled in Release with debug info as described, seems
to work good.
I still believe the problem is on the side of libcurl, but I don't see an
effective way how to make you reproduce it on your PC. A more effective way
will be reproducing the bug and debugging it in my environment, while you
watch (and maybe control) the process using a "PC anywhere" or something of
this kind. What do you think about this?

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2012-09-13 15:08

Message:
Thanks for reporting this issue and helping us improve curl and libcurl.

We're awaiting feedback in this issue. Due to this, I have set the state of
this issue to pending and it will automatically get closed later on unless
we get further info.

Please consider answering the outstanding questions or providing the
missing info so that we can proceed to resolve this issue!

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2012-09-06 10:49

Message:
I don't see how libcurl would work any differently depending on "debug" or
"release" builds. I would guess the problem is rather something in your
application's code that isn't done properly and thus through some chance
works in debug.

If you believe this is a libcurl bug, then please present us a small and
complete stand-alone source code we can build and run to see the problem.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3564730&group_id=976
Received on 2012-11-02

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET