Hi,
 
you may use the same H_SSL_CTX (handle to an SSL context) in concurrent threads. This structure serves as a factory of ssl connections.
You use SSL_new to create SSL connection handles (H_SSL). These you can use only within one thread.
So, you may share H_SSL_CTX, you may not share H_SSL.
HTH
André


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Urjit Gokhale
Sent: Donnerstag, 5. Oktober 2006 09:33
To: openssl-users@openssl.org
Subject: Need help: Understanding SSL object in multi-threaded environment

Hi all,
 
I have some doubts about openssl and multithreaded environment. I will appreciate if you could help me understand this better.
It is said that openssl is thread-safe with a limitation that "an SSL connection may not concurrently be used by multiple threads"
I am not clear on this point. What is meant by "using SSL connection concurrently by multiple threads" ?
 
I read somewhere that an SSL object modifies and maintains its state during reads and writes. So if the same object is used in multiple threads concurrently, chances are that due to state mismatch, the read/write may fail. Could someone explain this in more details. I believe that multiple threads would share the same SSL object. So in fact, they will be using 'the same SSL object'. Is this understanding correct? If yes, what is the issue with using the same object in multiple threads?
 
I am struggling to understand this. Could someone make the picture more clear?
 
Thank you,
~ Urjit
 
DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to