Skip to content

Commit a4488f2

Browse files
committed
fixed server context initialization
1 parent 1a81dbe commit a4488f2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

NetSSL_OpenSSL/src/SSLManager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ void SSLManager::initDefaultContext(bool server)
267267
usage = Context::TLSV1_SERVER_USE;
268268
else
269269
usage = Context::SERVER_USE;
270+
_ptrDefaultServerContext = new Context(usage, privKeyFile, certFile, caLocation, verMode, verDepth, loadDefCA, cipherList);
270271
}
271272
else
272273
{
@@ -278,9 +279,9 @@ void SSLManager::initDefaultContext(bool server)
278279
usage = Context::TLSV1_CLIENT_USE;
279280
else
280281
usage = Context::CLIENT_USE;
282+
_ptrDefaultClientContext = new Context(usage, privKeyFile, certFile, caLocation, verMode, verDepth, loadDefCA, cipherList);
281283
}
282284

283-
_ptrDefaultClientContext = new Context(usage, privKeyFile, certFile, caLocation, verMode, verDepth, loadDefCA, cipherList);
284285

285286
bool cacheSessions = config.getBool(prefix + CFG_CACHE_SESSIONS, false);
286287
if (server)

0 commit comments

Comments
 (0)