From 8b8313f8ddf570c5e79fef25e3dbba76698d28ea Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Aug 2022 15:00:15 +0300 Subject: Jabber: fix for TLS 1.3 bindings --- protocols/JabberG/src/jabber_opt.cpp | 1 + protocols/JabberG/src/jabber_proto.cpp | 1 + protocols/JabberG/src/jabber_proto.h | 1 + protocols/JabberG/src/jabber_secur.cpp | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 97a9251693..97f27a7db4 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -711,6 +711,7 @@ public: m_options.AddOption(LPGENW("Server options"), LPGENW("Use Stream Management (XEP-0198) if possible (experimental)"), m_proto->m_bEnableStreamMgmt); m_options.AddOption(LPGENW("Server options"), LPGENW("Disable SASL authentication (for old servers)"), m_proto->m_bDisable3920auth); m_options.AddOption(LPGENW("Server options"), LPGENW("Enable stream compression (if possible)"), m_proto->m_bEnableZlib); + m_options.AddOption(LPGENW("Server options"), LPGENW("Use TLS 1.3 bindings (if possible)"), m_proto->m_bUseTlsExport); m_options.AddOption(LPGENW("Other"), LPGENW("Enable remote controlling (from another resource of same JID only)"), m_proto->m_bEnableRemoteControl); m_options.AddOption(LPGENW("Other"), LPGENW("Show transport agents on contact list"), m_proto->m_bShowTransport); diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index cdae4a4df3..ce1dcca454 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -134,6 +134,7 @@ CJabberProto::CJabberProto(const char *aProtoName, const wchar_t *aUserName) : m_bUsePopups(this, "UsePopups", true), m_bUseSSL(this, "UseSSL", false), m_bUseTLS(this, "UseTLS", true), + m_bUseTlsExport(this, "UseTlsExport", false), m_iMamMode(this, "MamMode", 0), m_iConnectionKeepAliveInterval(this, "ConnectionKeepAliveInterval", 60000), diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index e13cd79e3e..c7b736a13f 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -236,6 +236,7 @@ struct CJabberProto : public PROTO, public IJabberInterface CMOption m_bUsePopups; CMOption m_bUseSSL; CMOption m_bUseTLS; + CMOption m_bUseTlsExport; CMOption m_iMamMode; CMOption m_iConnectionKeepAliveInterval; diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index e3a6dbdc34..a1cf3faccc 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -211,7 +211,7 @@ TScramAuth::TScramAuth(ThreadData *info, const char *pszMech, const EVP_MD *pMet priority = iPriority; if ((iPriority % 10) == 1) { - int cbLen, tlsVer; + int cbLen, tlsVer = info->proto->m_bUseTlsExport; void *pData = Netlib_GetTlsUnique(info->s, cbLen, tlsVer); if (pData == nullptr) bIsValid = false; -- cgit v1.2.3