cURL / Mailing Lists / curl-library / Single Mail


Using HTTPS in multi-threaded dynamic library plugin on CentOS

From: Adal Chiriliuc <>
Date: Thu, 15 Apr 2010 13:18:52 +0100


I have a big problem making https calls using libcurl 7.20.0 in a 32 bit application on CentOS 5.4 64 bit.

I’m making a dynamic library which uses libcurl for both http and https requests. libcurl is statically built and linked into the .so. When I try to make a https request, I get the “libcurl was built with SSL disabled, https: not supported!” error message. BUT, if I call curl_version_info and look at the returned structure, CURL_VERSION_SSL is on, and “https:” is in the list of supported protocols. However, and this is where it gets weird, ssl_version is NOT NULL, but it is pointing to an empty string (“”).

If I switch the build traget of the exact same project from “Dynamic Library” to “Application” and include a main() function in which I try to make a https: call, everything works fine. In this case, ssl_version does not point to an empty string, but to the expected result – “OpenSSL/0.9.8m”.

I though that maybe I’m building libcurl the wrong way, so I removed libcurl 7.20.0 from my project and relied on the CentOS supplied one (7.15.2). The same thing happens. CURL_VERSION_SSL is present, but ssl_version points is not NULL and points to an empty string.

I’ve also tried using the opensslthreadlock.c file, but it doesn’t help at all.

I tried breaking into the code just before the curl_version_info call, to see how ssl_version could end up empty (since looking at the code shows that this should not be possible), but unfortunately I couldn’t attach to the process hosting my dynamic library.

The win32 version of the same project works perfectly.

I’ve spent one day on this issue already, this is so annoying that I’m thinking of replacing OpenSSL with one of the other SSL libraries.

Best regards,

List admin:
Received on 2010-04-15