From f175bef138f45415b9559ee47c7be342ecb95ae0 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 22 Oct 2016 21:12:52 +0100 Subject: [PATCH] Testsuite: Add testcase for GnuTLS disconnect after STARTTLS --- test/log/2015 | 3 +++ test/scripts/2000-GnuTLS/2015 | 14 +++++++++++++- test/stdout/2015 | 20 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/test/log/2015 b/test/log/2015 index 9f5998640..7252550ca 100644 --- a/test/log/2015 +++ b/test/log/2015 @@ -4,3 +4,6 @@ 1999-03-02 09:44:33 SMTP connection from [127.0.0.1] (TCP/IP connection count = 1) 1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [127.0.0.1] (gnutls_handshake): timed out 1999-03-02 09:44:33 SMTP command timeout on connection from (rhu.barb) [127.0.0.1] +1999-03-02 09:44:33 SMTP connection from [127.0.0.1] (TCP/IP connection count = 1) +1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [127.0.0.1] (gnutls_handshake): The TLS connection was non-properly terminated. +1999-03-02 09:44:33 SMTP connection from (rhu.barb) [127.0.0.1] closed by EOF diff --git a/test/scripts/2000-GnuTLS/2015 b/test/scripts/2000-GnuTLS/2015 index 140af797f..b963e4e06 100644 --- a/test/scripts/2000-GnuTLS/2015 +++ b/test/scripts/2000-GnuTLS/2015 @@ -1,4 +1,4 @@ -# TLS server: timeout after accepting STARTTLS +# TLS server: timeout or close after accepting STARTTLS gnutls exim -DSERVER=server -bd -oX PORT_D **** @@ -16,4 +16,16 @@ starttls_wait +++ 2 ??? 421 **** +client-gnutls 127.0.0.1 PORT_D +??? 220 +ehlo rhu.barb +??? 250- +??? 250- +??? 250- +??? 250- +??? 250- +??? 250 +starttls_wait +??? 220 +**** killdaemon diff --git a/test/stdout/2015 b/test/stdout/2015 index fd6174058..42fe5c0fd 100644 --- a/test/stdout/2015 +++ b/test/stdout/2015 @@ -21,3 +21,23 @@ Connecting to 127.0.0.1 port 1225 ... connected ??? 421 <<< 421 myhost.test.ex: SMTP command timeout - closing connection End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> ehlo rhu.barb +??? 250- +<<< 250-myhost.test.ex Hello rhu.barb [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250- +<<< 250-STARTTLS +??? 250 +<<< 250 HELP +>>> starttls +??? 220 +<<< 220 TLS go ahead +End of script -- 2.30.2