CRYPTO_set_id_callback() needs thread IDs to be integers that fit in unsigned long, and is not supported otherwise.
What is this integer used for? Does it really need to be the thread ID, or just some integer which is unique for the thread? In the latter case the application can maintain a thread-local variable. pthread_key_create() + pthread_setspecific(), or a compiler extension like gcc's __thread. (Though the latter can break if a Windows DLL tries to create one, if I understand correctly). BTW, when I browsed the OpenSSL code and docs regarding id_callback, it was full of casting functions to other prototypes and calling them through the wrong prototype. That can break if there are different calling conventions for the different prototypes, or if e.g. a function return int is cast to returning a long. Then if long is wider than int, half the long which OpenSSL receives can contain garbage since the function did not actually return that data. -- Regards, Hallvard ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]