Permalink
Browse files

Added support for EXTERNAL

  • Loading branch information...
Daniel Vassdal Daniel Vassdal
Daniel Vassdal authored and Daniel Vassdal committed Mar 25, 2013
1 parent f2a5fa5 commit 929ef50908605ee49e0455ebb07c390a29c826ef
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/modules/m_sasl.cpp
View
@@ -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);
}

0 comments on commit 929ef50

Please sign in to comment.