> From: Friedrich Dominicus
> 
> I'm trying to get into openssl programming and run into the 
> following "problem". I've found nothing about that neither 
> while searching the web nore looking into this lib.
> 
> According to  threads(3) and also mentioned in "network 
> security with OpenSSL" from O'Reilly one has to provide 
> callback functions for using OpenSSL with threads. 
> 
> Now there do exist a few libraries (e.g libapr and glib) and 
> they have libraries for thread support also, and now comes my 
> question. What is the id_function while using glib? 
> can I simply cast one member of the GThread struct? (maybe 
> data?) alternatively what would be the callback function for libapr?

You need to use whatever mechanism is normal in your threading
environment of choice to generate a unique consistent identifier for a
thread. If you don't know what that is, the place to ask is a list or
group which discusses that environment's threading facilities. OpenSSL
doesn't know or care what mechanism is used - that's why it's left to
the user to provide it.

Many environments provide a function call which returns a thread
identifier. In those that don't, you can probably do something with
thread-private data facilities. Many programs need an identifier of this
sort, so I expect most threading support libraries will have some way to
create one. Experienced users of the environment should be able to
advise on a commonly-used method.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to