Skip to content

Loading…

Added support for SASL EXTERNAL #443

Merged
merged 1 commit into from

2 participants

@ShutterQuick

Modified m_sasl to recognize EXTERNAL and add the fingerprint, as described in #337

@attilamolnar attilamolnar merged commit 8d419c3 into inspircd:insp20
@attilamolnar
inspircd member

Thanks!

@ShutterQuick ShutterQuick deleted the ShutterQuick:sasl_external branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 25, 2013
  1. Added support for EXTERNAL

    Daniel Vassdal committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/modules/m_sasl.cpp
View
10 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);
}
Something went wrong with that request. Please try again.