From 53705d7e1a9a0b308cc33cb13511eef35733ade5 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Mon, 7 Jul 2025 14:29:48 +0000 Subject: [PATCH] Import from CS git --- SOURCES/lftp-4.8.4-tls-close.patch | 18 ++++++++++++------ SPECS/lftp.spec | 10 +++++++++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/SOURCES/lftp-4.8.4-tls-close.patch b/SOURCES/lftp-4.8.4-tls-close.patch index 986b2ff..e866fba 100644 --- a/SOURCES/lftp-4.8.4-tls-close.patch +++ b/SOURCES/lftp-4.8.4-tls-close.patch @@ -1,8 +1,8 @@ -commit 299a194cc86ea81c40d2146dd095dda3954efc81 +commit 4156522476192bd9a90aa747cdb8193ffc3a1f24 Author: Tomas Korbar -Date: Tue May 6 12:01:10 2025 +0200 +Date: Fri Jul 4 11:15:42 2025 +0200 - Ensure proper closing of TLS connection + Ensure close-notify is sent on end of TLS connection diff --git a/src/buffer.cc b/src/buffer.cc index 9ee6580..e54e20e 100644 @@ -106,7 +106,7 @@ index d3cf7f0..8915066 100644 #endif diff --git a/src/lftp_ssl.cc b/src/lftp_ssl.cc -index 0a0078a..8820b6f 100644 +index 0a0078a..19870da 100644 --- a/src/lftp_ssl.cc +++ b/src/lftp_ssl.cc @@ -45,6 +45,7 @@ lftp_ssl_base::lftp_ssl_base(int fd1,handshake_mode_t m,const char *h) @@ -117,7 +117,7 @@ index 0a0078a..8820b6f 100644 handshake_mode=m; fatal=false; cert_error=false; -@@ -347,10 +348,24 @@ void lftp_ssl_gnutls::load_keys() +@@ -347,10 +348,30 @@ void lftp_ssl_gnutls::load_keys() Log::global->Format(9, "Loaded %d CRLs\n", res); gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, cred); } @@ -134,6 +134,12 @@ index 0a0078a..8820b6f 100644 + goodbye_done = true; + return DONE; + } else if (res == GNUTLS_E_AGAIN || res == GNUTLS_E_INTERRUPTED) { ++ /* In ideal world we would not need this if, but windows does not ++ * send close-notify, so do not wait on server close-notify */ ++ if (gnutls_record_get_direction(session) == 0) { ++ goodbye_done = true; ++ return DONE; ++ } + return RETRY; + } + fatal=check_fatal(res); @@ -145,7 +151,7 @@ index 0a0078a..8820b6f 100644 } lftp_ssl_gnutls::~lftp_ssl_gnutls() { -@@ -849,10 +864,23 @@ void lftp_ssl_openssl::load_keys() +@@ -849,10 +870,23 @@ void lftp_ssl_openssl::load_keys() } } } diff --git a/SPECS/lftp.spec b/SPECS/lftp.spec index 42642e5..5fcc322 100644 --- a/SPECS/lftp.spec +++ b/SPECS/lftp.spec @@ -1,7 +1,7 @@ Summary: A sophisticated file transfer program Name: lftp Version: 4.8.4 -Release: 4%{?dist} +Release: 6%{?dist} License: GPLv3+ Group: Applications/Internet Source0: http://lftp.yar.ru/ftp/%{name}-%{version}.tar.xz @@ -107,6 +107,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jul 04 2025 Tomas Korbar - 4.8.4-6 +- Do not wait for server close-notify on TLS close +- Resolves: RHEL-99571 + +* Thu Jun 26 2025 Tomas Korbar - 4.8.4-5 +- Improve fix for close of TLS connection +- Resolves: RHEL-99571 + * Tue May 06 2025 Tomas Korbar - 4.8.4-4 - Ensure proper closing of TLS connection - Resolves: RHEL-88955