From 248adb61e7a0d0e196c1f7a433d879e2a0802983 Mon Sep 17 00:00:00 2001 From: thegeorg Date: Tue, 27 May 2025 23:00:31 +0300 Subject: Do not de-initialize openssl to avoid races Initialize openssl in pre-main (by the means of `SRCS GLOBAL`) to reduce chance of concurrent initialization with different flags. Do not de-initialize openssl to avoid races during `atexit` cleanup. It looks like `OPENSSL_cleanup()` does nothing in case of static linkage (according to ASan report). commit_hash:7d4bf183233970cc1772b1b8f2745044cc645c29 --- library/cpp/neh/https.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'library/cpp/neh/https.cpp') diff --git a/library/cpp/neh/https.cpp b/library/cpp/neh/https.cpp index 99db8a44cc2..e14dcf86679 100644 --- a/library/cpp/neh/https.cpp +++ b/library/cpp/neh/https.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include #include @@ -358,12 +357,6 @@ namespace NNeh { } } } - - struct TSSLInit { - inline TSSLInit() { - InitOpenSSL(); - } - } SSL_INIT; } static inline void PrepareSocket(SOCKET s) { -- cgit v1.3