[exim-cvs] Fix non-TLS build

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] Fix non-TLS build
Gitweb: https://git.exim.org/exim.git/commitdiff/b38a477da0a5248ed1d2b7590922c89c6337ec3b
Commit:     b38a477da0a5248ed1d2b7590922c89c6337ec3b
Parent:     d79247e6321bd44f4f21bc1234e0424d0fa558eb
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Thu Aug 27 21:15:19 2020 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Mon Aug 31 13:21:12 2020 +0100


    Fix non-TLS build
---
 src/src/transports/smtp.c | 18 +++++++++---------
 test/confs/2035           |  3 ++-
 test/confs/2135           |  5 +++--
 test/stderr/2035          |  3 ---
 test/stderr/2135          |  2 --
 5 files changed, 14 insertions(+), 17 deletions(-)


diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index dcff355..cdee928 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -1987,7 +1987,7 @@ if (sx->smtps)
         DEFER, FALSE, &sx->delivery_start);
   return ERROR;
   }
-#endif
+#else


/* If we have a proxied TLS connection, check usability for this message */

@@ -1996,7 +1996,7 @@ if (continue_hostname && continue_proxy_cipher)
int rc;
const uschar * sni = US"";

-#ifdef SUPPORT_DANE
+# ifdef SUPPORT_DANE
/* Check if the message will be DANE-verified; if so force its SNI */

   tls_out.dane_verified = FALSE;
@@ -2016,14 +2016,14 @@ if (continue_hostname && continue_proxy_cipher)
                   string_sprintf("DANE error: tlsa lookup %s",
                 rc_to_string(rc)),
                   rc, FALSE, &sx->delivery_start);
-# ifndef DISABLE_EVENT
+#  ifndef DISABLE_EVENT
                 (void) event_raise(sx->conn_args.tblock->event_action,
                   US"dane:fail", sx->dane_required
                 ?  US"dane-required" : US"dnssec-invalid");
-# endif
+#  endif
                 return rc;
       }
-#endif
+# endif


   /* If the SNI or the DANE status required for the new message differs from the
   existing conn drop the connection to force a new one. */
@@ -2033,7 +2033,7 @@ if (continue_hostname && continue_proxy_cipher)
       "<%s>: failed to expand transport's tls_sni value: %s",
       sx->addrlist->address, expand_string_message);


-#ifdef SUPPORT_DANE
+# ifdef SUPPORT_DANE
   if (  (continue_proxy_sni ? (Ustrcmp(continue_proxy_sni, sni) == 0) : !*sni)
      && continue_proxy_dane == sx->conn_args.dane)
     {
@@ -2041,10 +2041,10 @@ if (continue_hostname && continue_proxy_cipher)
     if ((tls_out.dane_verified = continue_proxy_dane))
       sx->conn_args.host->dnssec = DS_YES;
     }
-#else
+# else
   if ((continue_proxy_sni ? (Ustrcmp(continue_proxy_sni, sni) == 0) : !*sni))
     tls_out.sni = US sni;
-#endif
+# endif
   else
     {
     DEBUG(D_transport)
@@ -2060,7 +2060,7 @@ if (continue_hostname && continue_proxy_cipher)
                 back through reporting pipe. */
     }
   }
-
+#endif    /*!DISABLE_TLS*/


/* Make a connection to the host if this isn't a continued delivery, and handle
the initial interaction and HELO/EHLO/LHLO. Connect timeout errors are handled
diff --git a/test/confs/2035 b/test/confs/2035
index f7f2257..4022390 100644
--- a/test/confs/2035
+++ b/test/confs/2035
@@ -66,7 +66,8 @@ client:
begin transports

 t1:
-  driver =    smtp
+  driver =            smtp
+  port =            PORT_D
   tls_verify_certificates =    DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
   tls_verify_cert_hostnames =    :


diff --git a/test/confs/2135 b/test/confs/2135
index 4625f75..7f1e990 100644
--- a/test/confs/2135
+++ b/test/confs/2135
@@ -66,8 +66,9 @@ client:
begin transports

 t1:
-  driver =    smtp
-  hosts_try_fastopen =    :
+  driver =            smtp
+  port =            PORT_D
+  hosts_try_fastopen =        :
   tls_verify_certificates =    DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
   tls_verify_cert_hostnames =    :


diff --git a/test/stderr/2035 b/test/stderr/2035
index 7187d0d..5a69f57 100644
--- a/test/stderr/2035
+++ b/test/stderr/2035
@@ -3,7 +3,6 @@ configuration file is TESTSUITE/test-config
admin user
LOG: smtp_connection MAIN
SMTP connection from CALLER
-Transport port=25 replaced by host-specific port=1225
Connecting to 127.0.0.1 [127.0.0.1]:1225 ... connected
SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
SMTP>> EHLO myhost.test.ex
@@ -53,8 +52,6 @@ already connected to 127.0.0.1 [127.0.0.1] (on fd 0)
checking status of 127.0.0.1
127.0.0.1 [127.0.0.1]:1111 retry-status = usable
delivering 10HmaX-0005vi-00 to 127.0.0.1 [127.0.0.1] (userb@???)
-Transport port=25 replaced by host-specific port=1225
-Transport port=25 replaced by host-specific port=1225
continued connection, proxied TLS
SMTP>> DATA
cmd buf flush ddd bytes
diff --git a/test/stderr/2135 b/test/stderr/2135
index 7075906..5a69f57 100644
--- a/test/stderr/2135
+++ b/test/stderr/2135
@@ -3,7 +3,6 @@ configuration file is TESTSUITE/test-config
admin user
LOG: smtp_connection MAIN
SMTP connection from CALLER
-Transport port=25 replaced by host-specific port=1225
Connecting to 127.0.0.1 [127.0.0.1]:1225 ... connected
SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
SMTP>> EHLO myhost.test.ex
@@ -53,7 +52,6 @@ already connected to 127.0.0.1 [127.0.0.1] (on fd 0)
checking status of 127.0.0.1
127.0.0.1 [127.0.0.1]:1111 retry-status = usable
delivering 10HmaX-0005vi-00 to 127.0.0.1 [127.0.0.1] (userb@???)
-Transport port=25 replaced by host-specific port=1225
continued connection, proxied TLS
SMTP>> DATA
cmd buf flush ddd bytes