Bodo Moeller wrote:
> 
> Chris Bamford <[EMAIL PROTECTED]>:
> 
> >> Do you provide mutexes to the library?  For multi-threaded applications,
> >> the following calls are required in initialization:
> >>
> >>         CRYPTO_set_id_callback(id_callback);
> >>         CRYPTO_set_locking_callback(locking_callback);
Thankyou.
This has been very helpful.

> 
> > Hmmm.  Please bear with me. I have tried to code around the need for
> > serialisation of any kind because I'm trying to recreate a large
> > number of simultaneous hits on this web server.  I create one global
> > SSL_CTX structure as a shared resource.  I then launch the threads
> > which all create their own SSL structures based on the global
> > SSL_CTX structure.  As this is a "read- only" access of the SSL_CTX
> > structure, do I really need mutexes?
> 
> Yes.  The various threads write to several shared data objects, such
> as variables in the pseudo random number generator, reference counts
> in various data structures (including that SSL_CTX), etc.  If there
> are no mutexes to synchronize access to all these shared data
> structures, then things cannot be expected to work smoothly;
> we cannot promise that the program will quickly crash, either,
> but you should be surprised if it does.
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Chris Bamford
Contract Web Developer
ntli

Email:  [EMAIL PROTECTED]
Tel:    01256-752705
Mbl:    0467 844317
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to