From 5efe5037c5c47f61aa6b160a2836ebe18516e91b Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Fri, 22 Nov 2019 21:31:59 +0100 Subject: [PATCH] Fixed some small certificate issues --- server/src/InstanceHandler.cpp | 4 ++-- server/src/lincense/LicenseHelper.cpp | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/server/src/InstanceHandler.cpp b/server/src/InstanceHandler.cpp index 8283a28..0036a41 100644 --- a/server/src/InstanceHandler.cpp +++ b/server/src/InstanceHandler.cpp @@ -716,8 +716,7 @@ bool InstanceHandler::reloadConfig(std::vector& errors, bool reload string error; #ifdef COMPILE_WEB_CLIENT if(config::web::activated) { - this->sslMgr->unregister_web_contexts(); - //TODO: Generate default certificate (con-gate.work) + this->sslMgr->unregister_web_contexts(false); string error; for (auto &certificate : config::web::ssl::certificates) { @@ -862,5 +861,6 @@ void InstanceHandler::loadWebCertificate() { return; } + this->sslMgr->rename_context(strobf("web_default_new").string(), strobf("web_default").string()); this->web_cert_revision = revision; } \ No newline at end of file diff --git a/server/src/lincense/LicenseHelper.cpp b/server/src/lincense/LicenseHelper.cpp index b454b0d..013156d 100644 --- a/server/src/lincense/LicenseHelper.cpp +++ b/server/src/lincense/LicenseHelper.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include "src/InstanceHandler.h" #include "LicenseHelper.h" @@ -14,8 +13,6 @@ using namespace std::chrono; using namespace ts; using namespace ts::server; -#define DO_LOCAL_REQUEST - LicenseHelper::LicenseHelper() { this->scheduled_request = system_clock::now() + seconds(rand() % 30); //Check in one minute }