aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-08-06 00:50:05 +0100
committerGravatar Sadie Powell2023-08-06 00:50:05 +0100
commitcd6784021f39d09ab6b29261e43aea5fd96cc00c (patch)
tree8cca6af782f26f199d53df38cbe750d06662b26e /src/modules
parentMake ldapauth take an enum field for the username field. (diff)
Make config file cache invalidation more useful.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp7
-rw-r--r--src/modules/extra/m_ssl_mbedtls.cpp7
2 files changed, 2 insertions, 12 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 181e6bd49..f814e8ec4 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -65,8 +65,6 @@ static Module* thismod;
namespace GnuTLS
{
- time_t lastrehash = 0;
-
void GenRandom(char* buffer, size_t len)
{
gnutls_rnd(GNUTLS_RND_RANDOM, buffer, len);
@@ -487,7 +485,7 @@ namespace GnuTLS
static std::string ReadFile(const std::string& filename)
{
- auto file = ServerInstance->Config->ReadFile(filename, GnuTLS::lastrehash != ServerInstance->Time());
+ auto file = ServerInstance->Config->ReadFile(filename, ServerInstance->Time());
if (!file)
throw Exception("Cannot read file " + filename + ": " + file.error);
return file.contents;
@@ -1125,9 +1123,6 @@ class ModuleSSLGnuTLS final
void ReadProfiles()
{
- // Invalidate the filesystem cache.
- GnuTLS::lastrehash = ServerInstance->Time();
-
// First, store all profiles in a new, temporary container. If no problems occur, swap the two
// containers; this way if something goes wrong we can go back and continue using the current profiles,
// avoiding unpleasant situations where no new TLS connections are possible.
diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp
index c2309ea28..2a628a3e9 100644
--- a/src/modules/extra/m_ssl_mbedtls.cpp
+++ b/src/modules/extra/m_ssl_mbedtls.cpp
@@ -56,8 +56,6 @@ static Module* thismod;
namespace mbedTLS
{
- time_t lastrehash = 0;
-
class Exception final
: public ModuleException
{
@@ -524,7 +522,7 @@ namespace mbedTLS
static std::string ReadFile(const std::string& filename)
{
- auto file = ServerInstance->Config->ReadFile(filename, mbedTLS::lastrehash != ServerInstance->Time());
+ auto file = ServerInstance->Config->ReadFile(filename, ServerInstance->Time());
if (!file)
throw Exception("Cannot read file " + filename + ": " + file.error);
return file.contents;
@@ -922,9 +920,6 @@ private:
void ReadProfiles()
{
- // Invalidate the filesystem cache.
- mbedTLS::lastrehash = ServerInstance->Time();
-
// First, store all profiles in a new, temporary container. If no problems occur, swap the two
// containers; this way if something goes wrong we can go back and continue using the current profiles,
// avoiding unpleasant situations where no new TLS connections are possible.