summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-10-11 12:15:05 +0100
committerPeter Powell <petpow@saberuk.com>2017-10-11 12:32:04 +0100
commit0337b92c158fa662f04056343affd59315da78db (patch)
treeecddf07a0cfd7a142b538e6d98425bb13b52b7cb /src
parent314f5f65df564daf193457ee5df5e7de02a0c3a5 (diff)
Include connection security with the SASL host information.
See atheme/atheme@b41753f740 for more details.
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_sasl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 5afab9502..0ef93ec5a 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -99,6 +99,15 @@ class SaslAuthenticator
params.push_back(host);
params.push_back(ip);
+ LocalUser* lu = IS_LOCAL(user);
+ if (lu)
+ {
+ // NOTE: SaslAuthenticator instances are only created for local
+ // users so this parameter will always be appended.
+ SocketCertificateRequest req(&lu->eh, ServerInstance->Modules->Find("m_sasl.so"));
+ params.push_back(req.cert ? "S" : "P");
+ }
+
SendSASL(params);
}