Threading model constraint?

2002-10-25 Thread Dick . Bridges
I'm retrofitting an existing program to use [OpenSSL?] TLS between nodes.
Most of my info comes from reading Network Security with OpenSSL and
lurking on this list.  I don't have the time right now to grok the code,
hence this request.

Our app uses a leader-follower thread pattern (e.g., Pattern-Oriented
Software Architecture, Schmidt, et al) which means that any given
connection event will be serviced by selecting from a threadpool.  My
reading suggests that OpenSSL is built around a thread-per-connection
orientation.  On the other hand, I think I remember reading that OpenSSL
does not use thread local storage so I thought we should be able to work
around that since we can get to the BIO's underlying fd.  Then I read that
error state was maintained by thread id.  %-[

Can someone clarify this for me:  does OpenSSL depend upon
one-thread-per-connection or can it be used in the context of other
threading models?

TIA

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



Re: Threading model constraint?

2002-10-25 Thread David Schwartz

On Fri, 25 Oct 2002 09:19:51 -0700, [EMAIL PROTECTED] wrote:

Our app uses a leader-follower thread pattern (e.g., Pattern-Oriented
Software Architecture, Schmidt, et al) which means that any given
connection event will be serviced by selecting from a threadpool.  My
reading suggests that OpenSSL is built around a thread-per-connection
orientation.  On the other hand, I think I remember reading that OpenSSL
does not use thread local storage so I thought we should be able to work
around that since we can get to the BIO's underlying fd.  Then I read that
error state was maintained by thread id.  %-[

Can someone clarify this for me:  does OpenSSL depend upon
one-thread-per-connection or can it be used in the context of other
threading models?

Use bio pairs and don't let the OpenSSL ilbrary ever touch a file 
descriptor. You can then do the threading any way you want. The only 
exception is that you can't run the OpenSSL data pump in both directions for 
the same connection.

DS


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