cURL / Mailing Lists / curl-library / Single Mail

curl-library

ssl thread safety

From: <beelzebob999-libcurl_at_yahoo.com>
Date: Fri, 9 Nov 2007 05:56:51 -0800 (PST)

I'm looking for some clarification of the
thread-safety issues in openssl and libcurl. From
what I can tell, you only need to write the
thread-safty callbacks (locking_function and
id_function) if multiple threads will access the SAME
curl connection and only if that curl connection uses
SSL. So, if each thread uses it's own curl/sll
connection, is it necessary to write the callbacks?
That is, I will have multiple threads, each opening a
curl connection that uses ssl, but these threads will
not be trying to use a curl connection from another
thread. So, do I need to write those callbacks, or
don't I?

Additionally, I'm using a precompiled curl library,
the source of which, unfortunately, I don't remember,
but I'm sure it was one of the links from the bottom
of the download page at curl.haxx.se. It includes
libcurl.dll, libeay32.dll and ssleay32.dll. I'm
assuming this is a standard distribution, so will this
have been built with the necessary callbacks
implemented that make openssl thread safe? Is there a
way to tell?

Thanks.
Received on 2007-11-09