inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 62ba7c3917955b27b7967ccde0dc55b947e04782
parent b518f45d72e2c7bd38d4ecf155efbf4046c3f57c
Author: Peter Powell <petpow@saberuk.com>
Date:   Thu, 14 Mar 2019 10:49:19 +0000

Generate the ssl_cert metadata before bursting a connecting user.

Diffstat:
Msrc/modules/m_spanningtree/main.cpp | 5+++++
Msrc/modules/m_spanningtree/main.h | 4++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp @@ -45,6 +45,7 @@ ModuleSpanningTree::ModuleSpanningTree() , commands(this) , currmembid(0) , eventprov(this, "event/server") + , sslapi(this) , DNS(this, "DNS") , tagevprov(this, "event/messagetag") , loopCall(false) @@ -447,6 +448,10 @@ void ModuleSpanningTree::OnUserConnect(LocalUser* user) if (user->quitting) return; + // Create the lazy ssl_cert metadata for this user if not already created. + if (sslapi) + sslapi->GetCertificate(user); + CommandUID::Builder(user).Broadcast(); if (user->IsOper()) diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h @@ -26,6 +26,7 @@ #include "inspircd.h" #include "event.h" #include "modules/dns.h" +#include "modules/ssl.h" #include "modules/stats.h" #include "servercommand.h" #include "commands.h" @@ -80,6 +81,9 @@ class ModuleSpanningTree */ Events::ModuleEventProvider eventprov; + /** API for accessing user SSL certificates. */ + UserCertificateAPI sslapi; + public: dynamic_reference<DNS::Manager> DNS;