>My client and server has two threads each: a reader thread and a writer thread. >I have put the renegotiation code in the reader thread. It works for most >of the time but occasionally the client gets an "Encrypted Alert" message >( I suspect that this happens when the application data somehow gets in-between).
>How can I do renegotiation if both my client and server communicate on a duplex >channel with reader and writer threads? I'm not sure what you mean by "reader" and "writer", but if you mean that both threads call OpenSSL functions, you will need to associate a mutex with each connection to ensure that the reader thread and writer thread are not trying to manipulate that SSL connection at the same time. Unlike a TCP connection as presented by the kernel to user space, an SSL connection is *NOT* two independent directions. It is a single state machine. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]