> David,
>
> Does "same session" mean, same instance of an ssl object, or same
> instance of a ctx object?

        You are permitted concurrent access to different SSL sessions based on 
the
same context. You just cannot read and write to the same session at the same
time. (You also can't read a session in one thread and close it in another
or anything like that.)

        This is a semantic difference between SSL sessions and regular TCP 
sockets.
The usual solution is to associate in your application a mutex with each SSL
session. Hold the mutex while you call an SSL_* function for that session.

        Another thing to watch out for, breaking the rules that do exist for
regular TCP connections is generally non-disastrous whereas breaking then
with SSL connections generally is disastrous. For example, it's not legal
with a TCP connection to call 'close' in one connection while you might be
calling 'read' in another, but it usually won't cause a disaster.

        DS


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

Reply via email to