Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37556829
en ru br
ALT Linux repos
S:1.9.4-alt3
5.0: 0.57-alt1.1
4.1: 0.57-alt0.M41.2
4.0: 0.57-alt0.M40.1
3.0: 0.38-alt1

Group :: Development/C
RPM: libetpan

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: Fix-TLS-timeouts-with-recent-versions-of-GnuTLS-330.patch
Download


From 4aee22436809af67f23170fe15106b91ff2971e6 Mon Sep 17 00:00:00 2001
From: Nick Thomas <lupine@users.noreply.github.com>
Date: Mon, 22 Apr 2019 18:30:57 +0100
Subject: [PATCH 3/3] Fix TLS timeouts with recent versions of GnuTLS (#330)
gnutls_handshake_set_timeout takes a timeout value in ms, but we were
providing a value in seconds. This means that on new-enough platforms
that use GnuTLS (e.g., Debian Buster), we would accidentally configure
a timeout 1,000 times shorter than requested.
---
 src/data-types/mailstream_ssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/data-types/mailstream_ssl.c b/src/data-types/mailstream_ssl.c
index a690152..970c892 100644
--- a/src/data-types/mailstream_ssl.c
+++ b/src/data-types/mailstream_ssl.c
@@ -636,7 +636,7 @@ static struct mailstream_ssl_data * ssl_data_new(int fd, time_t timeout,
 		timeout_value = mailstream_network_delay.tv_sec * 1000 + mailstream_network_delay.tv_usec / 1000;
   }
   else {
-		timeout_value = timeout;
+		timeout_value = timeout * 1000;
   }
 #if GNUTLS_VERSION_NUMBER >= 0x030100
 	gnutls_handshake_set_timeout(session, timeout_value);
-- 
2.21.0
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin