Wayne Feick wrote: > Our server has one background thread constantly calling SSL_read() > to drain incoming data. There are multiple threads generating outgoing > data but all the SSL_write() calls are serialized with a semaphore. > All I/O is blocking.
I'm not sure how you could make this work. If all I/O is blocking, the call to SSL_read will block until data is available. If a thread generating outgoing data wants to call SSL_write, how can it do so since the reader thread will hold the sempahore? You do realize that you cannot concurrently call SSL_read and SSL_write on the same SSL connection. You can concurrently call SSL_write on distinct SSL connections. Also, OpenSSL will renegotiate automatically. BIO_set_ssl_renegotiate_bytes() sets the renegotiate byte count to num. When set after every num bytes of I/O (read and write) the SSL session is automatically renegotiated. num must be at least 512 bytes. BIO_set_ssl_renegotiate_timeout() sets the renegotiate timeout to seconds. When the renegotiate timeout elapses the session is automatically renegotiated. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org