From 6d57bbe05c31c79eaad02fe81cfb9c1ed6b79c58 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 13 Sep 2009 20:30:25 +0000 Subject: Change Extensible to use strongly typed entries git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11696 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/hmac.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/modules/m_spanningtree/hmac.cpp') diff --git a/src/modules/m_spanningtree/hmac.cpp b/src/modules/m_spanningtree/hmac.cpp index 332e47585..348a453a6 100644 --- a/src/modules/m_spanningtree/hmac.cpp +++ b/src/modules/m_spanningtree/hmac.cpp @@ -128,17 +128,22 @@ bool TreeSocket::ComparePass(const Link& link, const std::string &theirs) this->auth_fingerprint = !link.Fingerprint.empty(); this->auth_challenge = !ourchallenge.empty() && !theirchallenge.empty(); - const char* fp = NULL; + std::string fp; if (GetHook()) - fp = BufferedSocketFingerprintRequest(this, Utils->Creator, GetHook()).Send(); - - if (fp) - ServerInstance->Logs->Log("m_spanningtree", DEFAULT, std::string("Server SSL fingerprint ") + fp); + { + BufferedSocketCertificateRequest req(this, Utils->Creator, GetHook()); + req.Send(); + if (req.cert) + { + fp = req.cert->GetFingerprint(); + ServerInstance->Logs->Log("m_spanningtree", DEFAULT, std::string("Server SSL fingerprint ") + fp); + } + } if (auth_fingerprint) { /* Require fingerprint to exist and match */ - if (!fp || link.Fingerprint != std::string(fp)) + if (link.Fingerprint != fp) return false; } -- cgit v1.3.1-10-gc9f91