OpenSSL and multi-threads
问题 I've been reading about the requirement that if OpenSSL is used in a multi-threaded application, you have to register a thread identification function (and also a mutex creation function) with OpenSSL. On Linux, according to the example provided by OpenSSL, a thread is normally identified by registering a function like this: static unsigned long id_function(void){ return (unsigned long)pthread_self(); } pthread_self() returns a pthread_t, and this works on Linux since pthread_t is just a