From 56f5d9bd6bb563f4f0eab011ed665da234d93e37 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Tue, 12 Dec 2006 15:47:39 +0000 Subject: [PATCH] Apply John Jetmore's patch to allow tls-on-connect and STARTTLS to be tested/used via the -bh/-bhc/-bs options. --- doc/doc-txt/ChangeLog | 5 ++++- src/ACKNOWLEDGMENTS | 5 +++-- src/src/tls-gnu.c | 5 +++-- src/src/tls-openssl.c | 5 +++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index b6d585584..cc55146b2 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.443 2006/12/11 14:15:59 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.444 2006/12/12 15:47:39 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -348,6 +348,9 @@ MH/01 local_scan ABI version incremented to 1.1. It should have been updated PH/51 Error processing for expansion failure of helo_data from an smtp transport during callout processing was broken. +PH/52 Applied John Jetmore's patch to allow tls-on-connect and STARTTLS to be + tested/used via the -bh/-bhc/-bs options. + Exim version 4.63 ----------------- diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index 4205df7b9..2f8f5acb0 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -1,4 +1,4 @@ -$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.65 2006/11/20 11:57:57 ph10 Exp $ +$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.66 2006/12/12 15:47:39 ph10 Exp $ EXIM ACKNOWLEDGEMENTS @@ -20,7 +20,7 @@ relatively small patches. Philip Hazel Lists created: 20 November 2002 -Last updated: 20 November 2006 +Last updated: 12 December 2006 THE OLD LIST @@ -172,6 +172,7 @@ Peter Ilieve Suggested patch for lookup search bug John Jetmore Writing and maintaining the 'exipick' utility Much helpful testing of the test suite & elsewhere Patch for -Mset + Patch for TLS testing with -bh/-bhc/-bs Bob Johannessen Patch for Sieve envelope tests bug Patch for negative uid/gid bug Brad Jorsch Patch for bitwise logical operators diff --git a/src/src/tls-gnu.c b/src/src/tls-gnu.c index 34b03e685..cbad69e1c 100644 --- a/src/src/tls-gnu.c +++ b/src/src/tls-gnu.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/tls-gnu.c,v 1.15 2006/12/04 15:15:00 ph10 Exp $ */ +/* $Cambridge: exim/src/src/tls-gnu.c,v 1.16 2006/12/12 15:47:39 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -809,7 +809,8 @@ if (!tls_on_connect) /* Now negotiate the TLS session. We put our own timer on it, since it seems that the GnuTLS library doesn't. */ -gnutls_transport_set_ptr(tls_session, (gnutls_transport_ptr)fileno(smtp_out)); +gnutls_transport_set_ptr2(tls_session, (gnutls_transport_ptr)fileno(smtp_in), + (gnutls_transport_ptr)fileno(smtp_out)); sigalrm_seen = FALSE; if (smtp_receive_timeout > 0) alarm(smtp_receive_timeout); diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c index 146cb6293..106f57470 100644 --- a/src/src/tls-openssl.c +++ b/src/src/tls-openssl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/tls-openssl.c,v 1.7 2006/02/14 14:12:07 ph10 Exp $ */ +/* $Cambridge: exim/src/src/tls-openssl.c,v 1.8 2006/12/12 15:47:39 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -684,7 +684,8 @@ if (!tls_on_connect) /* Now negotiate the TLS session. We put our own timer on it, since it seems that the OpenSSL library doesn't. */ -SSL_set_fd(ssl, fileno(smtp_out)); +SSL_set_wfd(ssl, fileno(smtp_out)); +SSL_set_rfd(ssl, fileno(smtp_in)); SSL_set_accept_state(ssl); DEBUG(D_tls) debug_printf("Calling SSL_accept\n"); -- 2.30.2