summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2013-03-26 09:41:48 -0700
committerAttila Molnar <attilamolnar@hush.com>2013-03-26 09:41:48 -0700
commit8d419c3873cd3593baf4cc5f66bbe854a3a4614f (patch)
tree1a27cbf525d33013749025e12dc75d132fbf1efd /src/modules
parent31344bbedf40756d2476062c8426413872d7d4de (diff)
parent929ef50908605ee49e0455ebb07c390a29c826ef (diff)
Merge pull request #443 from ShutterQuick/sasl_external
Added support for SASL EXTERNAL
Diffstat (limited to 'src/modules')
-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);
}