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 --- src/mir_app/src/netlib_ssl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mir_app/src/netlib_ssl.cpp b/src/mir_app/src/netlib_ssl.cpp index 3bf4c2afa3..d2ab355ec6 100644 --- a/src/mir_app/src/netlib_ssl.cpp +++ b/src/mir_app/src/netlib_ssl.cpp @@ -389,7 +389,7 @@ MIR_APP_DLL(void*) Netlib_GetTlsUnique(HNETLIBCONN nlc, int &cbLen, int &tlsVer) char buf[1000]; auto *pszVersion = SSL_get_version(nlc->hSsl->session); - if (!mir_strcmp(pszVersion, "TLSv1.3")) { + if (tlsVer && !mir_strcmp(pszVersion, "TLSv1.3")) { int res = SSL_export_keying_material(nlc->hSsl->session, (uint8_t *)buf, 32, TLS13_Label, sizeof(TLS13_Label) - 1, 0, 0, 0); if (res == 1) { -- cgit v1.2.3