mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-26 22:06:35 +01:00
db8b3116f4
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
24 lines
576 B
Diff
24 lines
576 B
Diff
Subject: Fix TLS 1.3 handshake
|
|
From: Jeff King <peff@peff.net>
|
|
Bug-Debian: https://bugs.debian.org/932605
|
|
Last-Update: 2019-08-13
|
|
|
|
diff --git a/ssmtp.c b/ssmtp.c
|
|
index 7ab79ab..6b2b9d0 100644
|
|
--- a/ssmtp.c
|
|
+++ b/ssmtp.c
|
|
@@ -1291,8 +1291,12 @@ fd_getc() -- Read a character from an fd
|
|
ssize_t fd_getc(int fd, void *c)
|
|
{
|
|
#ifdef HAVE_SSL
|
|
- if(use_tls == True) {
|
|
- return(SSL_read(ssl, c, 1));
|
|
+ if(use_tls == True) {
|
|
+ int attempt = 3;
|
|
+ int ret = 0;
|
|
+ while (attempt-- > 0 && ret == 0)
|
|
+ ret = SSL_read(ssl, c, 1);
|
|
+ return ret;
|
|
}
|
|
#endif
|
|
return(read(fd, c, 1));
|