Do these thread problems also occur when sharing the same SSL context but
not the same SSL object?

thanks,
-erik

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Levitte -
VMS Whacker
Sent: Tuesday, June 27, 2000 9:16 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Does anyone know how to fix Multithreading??


From: Bill Rebey <[EMAIL PROTECTED]>

Bill.Rebey> I based my product on OpenSSL with the understanding that
Bill.Rebey> OpenSSL was multi-thread safe.  It has since been brought
Bill.Rebey> to my attention that OpenSSL in fact NOT thread safe and
Bill.Rebey> can not read and write the same SSL from two different
Bill.Rebey> threads.

True, that aspect of OpenSSL is lacking...

Bill.Rebey> Does anyone know how I can fix the OpenSSL code so that
Bill.Rebey> this works?  Does anyone even know what things in the SSL
Bill.Rebey> are thread-Unsafe so that I might know where to begin
Bill.Rebey> looking?

One quick if not easy way to deal with it is to make your own wrappers
around SSL_read() and SSL_write(), using SSL-specific locks.  You can
associate the lock handles with the SSL structures through the ex_data
member.

Doing it directly in OpenSSL is bulky at best right now, and also
needs to be handled in a very general way, keeping in consideration
that on Windows, handles are a limited resource.  I've some ideas on
how to go around that with an OpenSSL-specific lock implementation
(I've mentioned it before, I think).

--
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Chairman@Stacken   \ S-168 35  BROMMA  \ T: +46-8-26 52 47
Redakteur@Stacken   \      SWEDEN       \ or +46-709-50 36 10
Procurator Odiosus Ex Infernis             -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/
Software Engineer, Celo Communications: http://www.celocom.com/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to