summaryrefslogtreecommitdiff
path: root/src/modules/m_sasl.cpp
diff options
context:
space:
mode:
authorDaniel Vassdal <daniel@daniel-VirtualBox.(none)>2013-03-25 15:04:26 +0100
committerDaniel Vassdal <daniel@daniel-VirtualBox.(none)>2013-03-25 23:38:48 +0100
commit929ef50908605ee49e0455ebb07c390a29c826ef (patch)
treefe7e032630dba07992d8f8166a01401fdd9c82cf /src/modules/m_sasl.cpp
parentf2a5fa58edb13ad70764ecd8c5d52041b8b6eed0 (diff)
Added support for EXTERNAL
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);
}