From 62ba7c3917955b27b7967ccde0dc55b947e04782 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 14 Mar 2019 10:49:19 +0000 Subject: Generate the ssl_cert metadata before bursting a connecting user. --- src/modules/m_spanningtree/main.cpp | 5 +++++ src/modules/m_spanningtree/main.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index de1e8eb19..920840f9b 100644 --- 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 index fa2928687..ec97e73be 100644 --- 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; -- cgit v1.2.3