dsahlberg-apache-org commented on code in PR #8:
URL: https://github.com/apache/serf/pull/8#discussion_r2160333222


##########
buckets/ssl_buckets.c:
##########
@@ -1515,6 +1534,12 @@ static void init_ssl_libraries(void)
         OpenSSL_add_all_algorithms();
 #endif
 
+#if defined(SERF_HAVE_OSSL_STORE_OPEN_EX)
+        if (ssl_x509_ex_data_idx < 0) {
+            ssl_x509_ex_data_idx = X509_get_ex_new_index(0, NULL, NULL, NULL, 
NULL);
+        }
+#endif
+

Review Comment:
   This looks good to me now, even if X509_get_ex_new_index() isn't thread 
safe, have_init_ssl should make sure it can't be run by several threads at the 
same time.
   
   However, do we need to CRYPTO_free_ex_index() the index, for example in 
cleanup_ssl?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@serf.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to