diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-23 16:28:16 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-23 16:28:16 +0300 |
commit | cbdf4e985f31329a131e2b5cd1ba10051373bf2a (patch) | |
tree | d22112ca5991fab6cb743b1cfcd52223af7f8b86 /protocols/JabberG/src/jabber_thread.cpp | |
parent | 7d792ed6fb393548f886d30c2fa69f0a8555d01b (diff) |
fixes #3793 (XEP-0440: SASL Channel-Binding Type Capability support)
Diffstat (limited to 'protocols/JabberG/src/jabber_thread.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 24864a0116..a7461785a3 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -632,6 +632,7 @@ void CJabberProto::OnProcessFeatures(const TiXmlElement *node, ThreadData *info) bool isRegisterAvailable = false;
bool areMechanismsDefined = false;
+ m_bTlsExporter = m_bTlsServerEndpoint = false;
for (auto *n : TiXmlEnum(node)) {
auto *pszName = n->Name();
@@ -729,6 +730,16 @@ void CJabberProto::OnProcessFeatures(const TiXmlElement *node, ThreadData *info) }
else info->jabberServerCaps |= pCaps->GetCaps();
}
+ else if (!mir_strcmp(pszName, "sasl-channel-binding") && !mir_strcmp(n->Attribute("xmlns"), JABBER_FEAT_CHANNEL_BINDING)) {
+ for (auto *it : TiXmlFilter(n, "channel-binding")) {
+ if (auto *pszType = it->Attribute("type")) {
+ if (!mir_strcmp(pszType, "tls-exporter"))
+ m_bTlsExporter = true;
+ else if (!mir_strcmp(pszType, "tls-server-end-point"))
+ m_bTlsServerEndpoint = true;
+ }
+ }
+ }
}
if (areMechanismsDefined) {
|