From: Jeremy Harris Date: Sun, 26 Nov 2023 20:28:07 +0000 (+0000) Subject: Unbreak DISABLE_TLS_RESUME build X-Git-Tag: exim-4.98-RC0~120 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/5d0d124a8b49b484cda869bcb0d3e5224716d276?hp=33c9e43ec040c0a29394d8e3b745180ddddc0ed8 Unbreak DISABLE_TLS_RESUME build Broken-by: 5d5ad9fb16a2 --- diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index c53e1000f..4cf58436d 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -761,13 +761,14 @@ return TRUE; } +#if !defined(DISABLE_TLS) && !defined(DISABLE_TLS_RESUME) + /* Grab a string differentiating server behind a loadbalancer, for TLS resumption when such servers do not share a session-cache */ static void ehlo_response_lbserver(smtp_context * sx, const uschar * name_extract) { -#if !defined(DISABLE_TLS) && !defined(DISABLE_TLS_RESUME) const uschar * s; uschar * save_item = iterate_item; @@ -778,8 +779,8 @@ s = expand_cstring(name_extract); iterate_item = save_item; sx->conn_args.host_lbserver = s && !*s ? NULL : s; sx->conn_args.have_lbserver = TRUE; -#endif } +#endif @@ -1075,9 +1076,11 @@ if (pending_BANNER) } /*XXX EXPERIMENTAL_ESMTP_LIMITS ? */ +# ifndef DISABLE_TLS_RESUME s = ((smtp_transport_options_block *)sx->conn_args.ob)->host_name_extract; if (!s) s = HNE_DEFAULT; ehlo_response_lbserver(sx, s); +# endif } if (pending_EHLO) @@ -2482,13 +2485,14 @@ goto SEND_QUIT; ob->tls_tempfail_tryclear = FALSE; smtp_command = US"SSL-on-connect"; +# ifndef DISABLE_TLS_RESUME /* Having no EHLO response yet, cannot peek there for a servername to detect an LB. Call this anyway, so that a dummy host_name_extract option value can force resumption attempts. */ if (!(s = ob->host_name_extract)) s = US"never-LB"; ehlo_response_lbserver(sx, s); - +# endif goto TLS_NEGOTIATE; } #endif @@ -2613,8 +2617,10 @@ goto SEND_QUIT; } } #endif +#ifndef DISABLE_TLS_RESUME if (!(s = ob->host_name_extract)) s = HNE_DEFAULT; ehlo_response_lbserver(sx, s); +#endif } /* Set tls_offered if the response to EHLO specifies support for STARTTLS. */