Hello again and thank you for your replies


I'll probably do it that way too. My threads are defined in another language and I'm pretty sure there is no way for my C module to be aware of which user thread it is currently running in... so I have nothing
relevant to call CRYPTO_set_id_callback with.

Well, this "CRYPTO_set_id_callback" seems to me not relevant either incase of IOCP server (or asynch/non blocking IO), since the thread reading or writing the BIO will NOT be the same ALWAYS, may be it is useful when doing a blocking IO i.e something like a thread per socket senario. As I understand, OpenSSL maintains a per thread error queue (seems not very useful atleast in this case, or a better solution would be to maintain a error queue per SSL object (OpenSSL SSL object)). So I do set that callback, since it is advised :).

So this really isn't much of a problem for me, but I'm still curious about the macros:
OPENSSL_THREAD_DEFINES
THREADS
OPENSSL_THREADS


Probably this THREADS is defined in some build script. Do a text search in the OpenSSL dir with "-DTHREADS".

Is the note in http://www.openssl.org/docs/crypto/threads.html still valid in 0.9.8a ?

Well, I am just implementing the static callbacks, not the dynamic callbacks, probably the dynmic callbacks are under-dev. One piece of advise, in the example in the "crypto\threads\th-locks.h" and also i think the code from the OpenSSL book uses "Mutex", probably its a good choice on *inx systems, but on Windows Mutex should be used to synchronise between "Processes" and they are SLOW compared to other options (even though Mutexs will work for threads also). The better and FASTER approach is to use "CRITICAL_SECTION", see MSDN for info.

Thanks again for your answers,

--
Alain Damiral,

Université Catholique de Louvain - student
alain.damiral'at'student.info.ucl.ac.be

Hope this helps,
Regards,
Usman.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to