@@ -125,7 +125,7 @@ void SSLManager::initializeClient(PrivateKeyPassphraseHandlerPtr ptrPassphraseHa
125125Context::Ptr SSLManager::defaultServerContext ()
126126{
127127 Poco::FastMutex::ScopedLock lock (_mutex);
128-
128+
129129 if (!_ptrDefaultServerContext)
130130 initDefaultContext (true );
131131
@@ -150,7 +150,7 @@ Context::Ptr SSLManager::defaultClientContext()
150150 _ptrDefaultClientContext->disableProtocols (Context::PROTO_SSLV2 | Context::PROTO_SSLV3);
151151 }
152152 }
153-
153+
154154 return _ptrDefaultClientContext;
155155}
156156
@@ -256,7 +256,7 @@ void SSLManager::initDefaultContext(bool server)
256256 Context::Params params;
257257 // mandatory options
258258 params.privateKeyFile = config.getString (prefix + CFG_PRIV_KEY_FILE, " " );
259- params.certificateFile = config.getString (prefix + CFG_CERTIFICATE_FILE, params.privateKeyFile );
259+ params.certificateFile = config.getString (prefix + CFG_CERTIFICATE_FILE, params.privateKeyFile );
260260 params.caLocation = config.getString (prefix + CFG_CA_LOCATION, " " );
261261
262262 if (server && params.certificateFile .empty () && params.privateKeyFile .empty ())
@@ -283,7 +283,7 @@ void SSLManager::initDefaultContext(bool server)
283283 params.ecdhCurve = config.getString (prefix + CFG_ECDH_CURVE, " " );
284284
285285 Context::Usage usage;
286-
286+
287287 if (server)
288288 {
289289 if (requireTLSv1_2)
@@ -308,7 +308,7 @@ void SSLManager::initDefaultContext(bool server)
308308 usage = Context::CLIENT_USE;
309309 _ptrDefaultClientContext = new Context (usage, params);
310310 }
311-
311+
312312 std::string disabledProtocolsList = config.getString (prefix + CFG_DISABLE_PROTOCOLS, " " );
313313 Poco::StringTokenizer dpTok (disabledProtocolsList, " ;," , Poco::StringTokenizer::TOK_TRIM | Poco::StringTokenizer::TOK_IGNORE_EMPTY);
314314 int disabledProtocols = 0 ;
@@ -329,27 +329,28 @@ void SSLManager::initDefaultContext(bool server)
329329 _ptrDefaultServerContext->disableProtocols (disabledProtocols);
330330 else
331331 _ptrDefaultClientContext->disableProtocols (disabledProtocols);
332-
333- bool cacheSessions = config.getBool (prefix + CFG_CACHE_SESSIONS, false );
334- if (server)
335- {
336- std::string sessionIdContext = config.getString (prefix + CFG_SESSION_ID_CONTEXT, config.getString (" application.name" , " " ));
337- _ptrDefaultServerContext->enableSessionCache (cacheSessions, sessionIdContext);
338- if (config.hasProperty (prefix + CFG_SESSION_CACHE_SIZE))
339- {
340- int cacheSize = config.getInt (prefix + CFG_SESSION_CACHE_SIZE);
341- _ptrDefaultServerContext->setSessionCacheSize (cacheSize);
342- }
343- if (config.hasProperty (prefix + CFG_SESSION_TIMEOUT))
344- {
345- int timeout = config.getInt (prefix + CFG_SESSION_TIMEOUT);
346- _ptrDefaultServerContext->setSessionTimeout (timeout);
347- }
348- }
349- else
350- {
351- _ptrDefaultClientContext->enableSessionCache (cacheSessions);
352- }
332+
333+ // / Temporarily disabled during the transition from boringssl to OpenSSL due to tsan issues.
334+ // / bool cacheSessions = config.getBool(prefix + CFG_CACHE_SESSIONS, false);
335+ // / if (server)
336+ // / {
337+ // / std::string sessionIdContext = config.getString(prefix + CFG_SESSION_ID_CONTEXT, config.getString("application.name", ""));
338+ // / _ptrDefaultServerContext->enableSessionCache(cacheSessions, sessionIdContext);
339+ // / if (config.hasProperty(prefix + CFG_SESSION_CACHE_SIZE))
340+ // / {
341+ // / int cacheSize = config.getInt(prefix + CFG_SESSION_CACHE_SIZE);
342+ // / _ptrDefaultServerContext->setSessionCacheSize(cacheSize);
343+ // / }
344+ // / if (config.hasProperty(prefix + CFG_SESSION_TIMEOUT))
345+ // / {
346+ // / int timeout = config.getInt(prefix + CFG_SESSION_TIMEOUT);
347+ // / _ptrDefaultServerContext->setSessionTimeout(timeout);
348+ // / }
349+ // / }
350+ // / else
351+ // / {
352+ // / _ptrDefaultClientContext->enableSessionCache(cacheSessions);
353+ // / }
353354 bool extendedVerification = config.getBool (prefix + CFG_EXTENDED_VERIFICATION, false );
354355 if (server)
355356 _ptrDefaultServerContext->enableExtendedCertificateVerification (extendedVerification);
@@ -378,7 +379,7 @@ void SSLManager::initPassphraseHandler(bool server)
378379{
379380 if (server && _ptrServerPassphraseHandler) return ;
380381 if (!server && _ptrClientPassphraseHandler) return ;
381-
382+
382383 std::string prefix = server ? CFG_SERVER_PREFIX : CFG_CLIENT_PREFIX;
383384 Poco::Util::AbstractConfiguration& config = appConfig ();
384385
@@ -399,7 +400,7 @@ void SSLManager::initPassphraseHandler(bool server)
399400 }
400401 else throw Poco::Util::UnknownOptionException (std::string (" No passphrase handler known with the name " ) + className);
401402}
402-
403+
403404
404405void SSLManager::initCertificateHandler (bool server)
405406{
0 commit comments