RE: multithreading question

2010-01-21 Thread David Schwartz
Victor Duchovni wrote: Locking callbacks are needed for the reference counting in the CRYPTO library to not get messed up. Various bits of context are associated withe the new SSL object by reference. Locking callbacks are required, period. If you are using OpenSSL with multiple threads,

RE: multithreading question

2010-01-20 Thread David Schwartz
Wayne Feick wrote: Our server does a raw socket accept first, and then spawns a thread for each that brings up the ssl connection if applicable. The code flow is like this: int fd; SSL_CTX* ctx; SSL* ssl; BIO* fdbio = BIO_new_socket((int)fd, 0); BIO* bio = BIO_new_ssl(ctx,

Re: multithreading question

2010-01-20 Thread Victor Duchovni
On Wed, Jan 20, 2010 at 07:55:35PM -0800, David Schwartz wrote: Wayne Feick wrote: Our server does a raw socket accept first, and then spawns a thread for each that brings up the ssl connection if applicable. The code flow is like this: int fd; SSL_CTX* ctx; SSL* ssl;