]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sasl.cpp
m_callerid Route ACCEPT to the server of the target user only, do not send METADATA...
[user/henk/code/inspircd.git] / src / modules / m_sasl.cpp
index 8cae025e2c105dc7fdc443acd1a31fc0148ed360..45915ab4d1bd9ce588772d459be2b481191f7602 100644 (file)
@@ -52,7 +52,7 @@ class SaslAuthenticator
        bool state_announced;
 
  public:
-       SaslAuthenticator(User *user_, std::string method, Module *ctor)
+       SaslAuthenticator(User* user_, const std::string& method)
                : user(user_), state(SASL_INIT), state_announced(false)
        {
                parameterlist params;
@@ -63,10 +63,10 @@ class SaslAuthenticator
                params.push_back("S");
                params.push_back(method);
 
-               if (method == "EXTERNAL" && IS_LOCAL(user_))
+               LocalUser* localuser = IS_LOCAL(user);
+               if (method == "EXTERNAL" && localuser)
                {
-                       SocketCertificateRequest req(&((LocalUser*)user_)->eh, ServerInstance->Modules->Find("m_sasl.so"));
-                       std::string fp = req.GetFingerprint();
+                       std::string fp = SSLClientCert::GetFingerprint(&localuser->eh);
 
                        if (fp.size())
                                params.push_back(fp);
@@ -195,7 +195,7 @@ class CommandAuthenticate : public Command
 
                        SaslAuthenticator *sasl = authExt.get(user);
                        if (!sasl)
-                               authExt.set(user, new SaslAuthenticator(user, parameters[0], creator));
+                               authExt.set(user, new SaslAuthenticator(user, parameters[0]));
                        else if (sasl->SendClientMessage(parameters) == false)  // IAL abort extension --nenolod
                        {
                                sasl->AnnounceState();