<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br>Hi all,<br><br>Have a question at OpenSSL code on bind9.11.3.<br>from target file : openssl_link.c<br><br>I read source code,<br>it's looks like so that the "lock_callback" function may define it in<br>case of OpenSSL version more than 1.0 or less than 1.1. *1<br><br>However, I looks like the code line number 206 (in openssl_link.c) is<br>in case of OpenSSL version less than 1.1 on call of function<br>"lock_callback()". *2<br>Which is right?<br><br>I tried compile in rhel5 at now.(openssl 0.9.8 ......)<br>It'll be a compile error at this code line.<br>And when delete this code, any problems?<br><br><br>#### *1<br>106 #if OPENSSL_VERSION_NUMBER >= 0x10000000L &&<br>OPENSSL_VERSION_NUMBER < 0x10100000L ||<br>defined(LIBRESSL_VERSION_NUMBER)<br>107 static void<br>108 lock_callback(int mode, int type, const char *file, int line) {<br>109         UNUSED(file);<br>110         UNUSED(line);<br>111         if ((mode & CRYPTO_LOCK) != 0)<br>112                 LOCK(&locks[type]);<br>113         else<br>114                 UNLOCK(&locks[type]);<br>115 }<br>116 #endif<br><br><br>#### *2<br>206 #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)<br>207         nlocks = CRYPTO_num_locks();<br>208         locks = mem_alloc(sizeof(isc_mutex_t) * nlocks FILELINE);<br>209         if (locks == NULL)<br>210                 return (ISC_R_NOMEMORY);<br>211         result = isc_mutexblock_init(locks, nlocks);<br>212         if (result != ISC_R_SUCCESS)<br>213                 goto cleanup_mutexalloc;<br>214         CRYPTO_set_locking_callback(lock_callback);<br>215 # if OPENSSL_VERSION_NUMBER >= 0x10000000L &&<br>OPENSSL_VERSION_NUMBER < 0x10100000L<br>216         CRYPTO_THREADID_set_callback(_set_thread_id);<br>217 # else<br>218         CRYPTO_set_id_callback(id_callback);<br>219 # endif<br>220<br>221         ERR_load_crypto_strings();<br>222 #endif<br><br>regards.</span></font><div></div></body></html>