summaryrefslogtreecommitdiff
path: root/src/modules/m_sasl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_sasl.cpp')
-rw-r--r--src/modules/m_sasl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 59751588e..f8d8c5322 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -22,6 +22,7 @@
#include "m_cap.h"
#include "account.h"
#include "sasl.h"
+#include "ssl.h"
/* $ModDesc: Provides support for IRC Authentication Layer (aka: atheme SASL) via AUTHENTICATE. */
@@ -62,6 +63,15 @@ class SaslAuthenticator
params.push_back("S");
params.push_back(method);
+ if (method == "EXTERNAL" && IS_LOCAL(user_))
+ {
+ SocketCertificateRequest req(&((LocalUser*)user_)->eh, ServerInstance->Modules->Find("m_sasl.so"));
+ std::string fp = req.GetFingerprint();
+
+ if (fp.size())
+ params.push_back(fp);
+ }
+
SendSASL(params);
}