Re: Multithreaded SSL server...!!!

2008-09-09 Thread vinni rathore
Hi all... I would like to thanx.. to all the users fot he openssl.. that i got success in multi-threaded server with SSL APIs... gr8 ... Once again thnx a lot.. On Wed, Sep 3, 2008 at 4:27 PM, Ger Hobbelt <[EMAIL PROTECTED]> wrote: > Please mind the single line where Darryl mentioned > renegotia

Re: Multithreaded SSL server...!!!

2008-09-03 Thread Ger Hobbelt
Please mind the single line where Darryl mentioned renegotiation/rekeying of your SSL session. It means you may have to replicate the relevant bits of code in both read and write thread. (It's the SSL_WANT_READ and SSL_WANT_WRITE codes coming out of SSL_write() and SSL_read() respectively that are

RE: Multithreaded SSL server...!!!

2008-09-01 Thread Mark
Hi David, > > Does anyone have a definitive answer for this one? It could be a > > massive > > amount of work for me to rewrite the code if I have to > switch to using > > a single thread for read/write operations. > > Just to clarify, you can use two threads. You can use one for > read and o

Re: Multithreaded SSL server...!!!

2008-08-31 Thread vinni rathore
Hi , Actually my platform is RedHat Linux and compiler is GCC 3.4. I am creating a VPN Server here that also include work with TUN/TAP driver. And thats why i have 2 separate threads for reading and writing. By-the-way i am not creating threads per client, 2 threads(read/write) for every client.

RE: Multithreaded SSL server...!!!

2008-08-29 Thread David Schwartz
> Thanks, Kyle for the reply. > > Does anyone have a definitive answer for this one? It could be a > massive > amount of work for me to rewrite the code if I have to switch to using > a single thread for read/write operations. Just to clarify, you can use two threads. You can use one for read an

Re: Multithreaded SSL server...!!!

2008-08-29 Thread Darryl Miles
Mark wrote: Presumably you can use multiple threads for reading and writing as long as you ensure that they are not both calling an SSL function at the same time? Function ??? The important aspect is the principal object/handle you are passing the function. For most of the API that an appli

RE: Multithreaded SSL server...!!!

2008-08-29 Thread Mark
Thanks, Kyle for the reply. Does anyone have a definitive answer for this one? It could be a massive amount of work for me to rewrite the code if I have to switch to using a single thread for read/write operations. > -Original Message- > Mark: I don't know if the structure is managed in

Re: Multithreaded SSL server...!!!

2008-08-29 Thread Kyle Hamilton
The file crypto/threads/mttest.c in the source distribution, according to the man page for CRYPTO_set_locking_callback, shows examples for Solaris, Irix, and Win32. I don't know what platform you're on, but the Solaris example might help you more than anything else. Mark: I don't know if the stru

Re: Multithreaded SSL server...!!!

2008-08-29 Thread vinni rathore
hi .. I have read these lines.. "Multi-threaded applications must provide two callback functions to OpenSSL by calling CRYPTO_set_locking_callback() and CRYPTO_set_id_callback(), for all versions of OpenSSL up to and including 0.9.8[abc...]. As of version 0.9.9, CRYPTO_set_id_callback() and assoc

RE: Multithreaded SSL server...!!!

2008-08-29 Thread Mark
Presumably you can use multiple threads for reading and writing as long as you ensure that they are not both calling an SSL function at the same time? This is what I do. Mark > -Original Message- > > You cannot use different threads for reading and writing. OpenSSL is > thread-safe wi

Re: Multithreaded SSL server...!!!

2008-08-29 Thread Kyle Hamilton
You cannot use different threads for reading and writing. OpenSSL is thread-safe with the limitation that an SSL session cannot be used across multiple threads. (It may possibly work for one, but multiple clients call into the library at different and odd times.) http://www.openssl.org/support/f