Subject: Fix TLS 1.3 handshake From: Jeff King 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));