[exim-cvs] Fix mutiple message send under TLS

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Fix mutiple message send under TLS
Gitweb: https://git.exim.org/exim.git/commitdiff/c645dd29e7f9fcb7e3d2fd9f20aa47084ba0221e
Commit:     c645dd29e7f9fcb7e3d2fd9f20aa47084ba0221e
Parent:     74f1a42304ce056cf979d22fb970faae161e3ab2
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Jun 24 20:30:23 2018 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Jun 24 20:30:23 2018 +0100


    Fix mutiple message send under TLS


    Broken-by: 74f1a42304
---
 src/src/transports/smtp.c | 3 +++
 1 file changed, 3 insertions(+)


diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 1f0256f..1631817 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -2717,6 +2717,7 @@ for (fd_bits = 3; fd_bits; )
       {
       fd_bits = 0;
       tls_close(ct_ctx, TLS_SHUTDOWN_NOWAIT);
+      ct_ctx = NULL;
       }
     else
       {
@@ -3541,6 +3542,7 @@ if (sx.completed_addr && sx.ok && sx.send_quit)
       the socket on. */


       tls_close(sx.cctx.tls_ctx, TLS_SHUTDOWN_WAIT);
+      sx.cctx.tls_ctx = NULL;
       smtp_peer_options = smtp_peer_options_wrap;
       sx.ok = !sx.smtps
         && smtp_write_command(&sx.outblock, SCMD_FLUSH,
@@ -3654,6 +3656,7 @@ END_OFF:


#ifdef SUPPORT_TLS
tls_close(sx.cctx.tls_ctx, TLS_SHUTDOWN_NOWAIT);
+sx.cctx.tls_ctx = NULL;
#endif

/* Close the socket, and return the appropriate value, first setting