From 613dd4aed0ae1d1165f89a3d6819e51a033fcfb6 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 6 May 2012 18:53:34 +0100 Subject: [PATCH] Fix tls variables order, and testsuite case 5401 (cutthrough) for changes that went in with dual-tls. --- src/src/expand.c | 8 ++++---- test/log/5401 | 2 +- test/scripts/5400-cutthrough/5401 | 2 +- test/stderr/5401 | 8 +++++--- test/stdout/5401 | 6 ++++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/src/expand.c b/src/src/expand.c index f3bd3f162..1642c67b7 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -616,10 +616,6 @@ static var_entry var_table[] = { { "tls_bits", vtype_int, &tls_in.bits }, { "tls_certificate_verified", vtype_int, &tls_in.certificate_verified }, { "tls_cipher", vtype_stringptr, &tls_in.cipher }, - { "tls_peerdn", vtype_stringptr, &tls_in.peerdn }, -#if defined(SUPPORT_TLS) && !defined(USE_GNUTLS) - { "tls_sni", vtype_stringptr, &tls_in.sni }, -#endif { "tls_out_bits", vtype_int, &tls_out.bits }, { "tls_out_certificate_verified", vtype_int,&tls_out.certificate_verified }, { "tls_out_cipher", vtype_stringptr, &tls_out.cipher }, @@ -627,6 +623,10 @@ static var_entry var_table[] = { #if defined(SUPPORT_TLS) && !defined(USE_GNUTLS) { "tls_out_sni", vtype_stringptr, &tls_out.sni }, #endif + { "tls_peerdn", vtype_stringptr, &tls_in.peerdn }, /* mind the alphabetical order! */ +#if defined(SUPPORT_TLS) && !defined(USE_GNUTLS) + { "tls_sni", vtype_stringptr, &tls_in.sni }, /* mind the alphabetical order! */ +#endif { "tod_bsdinbox", vtype_todbsdin, NULL }, { "tod_epoch", vtype_tode, NULL }, diff --git a/test/log/5401 b/test/log/5401 index 6d38a372f..092467872 100644 --- a/test/log/5401 +++ b/test/log/5401 @@ -1,3 +1,3 @@ -1999-03-02 09:44:33 10HmaX-0005vi-00 >> userx@domain.com R=all T=smtp +1999-03-02 09:44:33 10HmaX-0005vi-00 >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/scripts/5400-cutthrough/5401 b/test/scripts/5400-cutthrough/5401 index 6104a7a7d..42a90f4cb 100644 --- a/test/scripts/5400-cutthrough/5401 +++ b/test/scripts/5400-cutthrough/5401 @@ -3,7 +3,7 @@ need_ipv4 # server PORT_S 220 ESMTP -HELO +EHLO 250 OK MAIL FROM: 250 Sender OK diff --git a/test/stderr/5401 b/test/stderr/5401 index dc02c054f..5db13fc41 100644 --- a/test/stderr/5401 +++ b/test/stderr/5401 @@ -12,7 +12,7 @@ accept: condition test succeeded in ACL "acl_rcpt" ----------- start cutthrough setup ------------ Connecting to 127.0.0.1 [127.0.0.1]:1224 from ip4.ip4.ip4.ip4 ... connected SMTP<< 220 ESMTP - SMTP>> HELO myhost.test.ex + SMTP>> EHLO myhost.test.ex SMTP<< 250 OK SMTP>> MAIL FROM: SMTP<< 250 Sender OK @@ -23,12 +23,14 @@ processing "accept" accept: condition test succeeded in inline ACL SMTP>> DATA SMTP<< 354 Send data + SMTP>>(nl) SMTP>> . SMTP<< 250 OK ------------ cutthrough close ------------ LOG: MAIN - >> userx@domain.com R=all T=smtp + >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] created log directory TESTSUITE/spool/log + SMTP>> QUIT +----------- cutthrough shutdown ------------ LOG: MAIN <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss LOG: MAIN diff --git a/test/stdout/5401 b/test/stdout/5401 index 79b7d73e2..2bfb35259 100644 --- a/test/stdout/5401 +++ b/test/stdout/5401 @@ -13,7 +13,7 @@ Listening on port 1224 ... Connection request from [ip4.ip4.ip4.ip4] 220 ESMTP -HELO myhost.test.ex +EHLO myhost.test.ex 250 OK MAIL FROM: 250 Sender OK @@ -32,4 +32,6 @@ Date: Tue, 2 Mar 1999 09:44:33 +0000 . 250 OK -Unexpected EOF read from client +QUIT +250 OK +End of script -- 2.25.1