cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: thread safe use of openssl

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 16 Dec 2003 11:24:14 +0100 (CET)

On Tue, 16 Dec 2003, jose chung wrote:

> Based on my perusal of the CURL code, it doesn't seem like it uses OpenSSL
> in a thread safe manner as it does not implement either the static locking
> or dynamic locking callbacks.

I've been under the impression that our use of OpenSSL does not warrant those
locking methods. I take your mail here as a saying that we do.

I find that odd, since I believe we have lots of users who have used libcurl
multi-threaded for HTTPS transfers...

> Since I couldn't find it, and since I had problems using HTTPS in CURL with
> multithreaded apps, I've implemented static and dynamic locking for VMS,
> AIX, and Win32 into CURL.

I don't want locking methods inside libcurl, since locking is a multi-platform
nightmare. The share interface was added for sharing data between multiple
threads, and I figure we could indeed use that interface for locking/share SSL
resources as well should this be determined to be necessary.

> I'm not certain if CURL has intentionally left this as an exercise for the
> user, but if it hasn't, I'd be happy to contribute what I have.

I would inded be interested, but we should perhaps first clear out what the
problems you've been experiencing resulted in and that this locking is really
necessary.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-16