summaryrefslogtreecommitdiff
path: root/lib/server/TLSContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/server/TLSContext.cpp')
-rw-r--r--lib/server/TLSContext.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/server/TLSContext.cpp b/lib/server/TLSContext.cpp
index 87df562c..da0b320c 100644
--- a/lib/server/TLSContext.cpp
+++ b/lib/server/TLSContext.cpp
@@ -1,4 +1,4 @@
-// distribution boxbackup-0.10 (svn version: 494)
+// distribution boxbackup-0.11rc1 (svn version: 2023_2024)
//
// Copyright (c) 2003 - 2006
// Ben Summers and contributors. All rights reserved.
@@ -99,6 +99,11 @@ TLSContext::~TLSContext()
// --------------------------------------------------------------------------
void TLSContext::Initialise(bool AsServer, const char *CertificatesFile, const char *PrivateKeyFile, const char *TrustedCAsFile)
{
+ if(mpContext != 0)
+ {
+ ::SSL_CTX_free(mpContext);
+ }
+
mpContext = ::SSL_CTX_new(AsServer?TLSv1_server_method():TLSv1_client_method());
if(mpContext == NULL)
{