From 72acdf0f6393ed7c1dec410068549a1c7c60faa3 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 8 Nov 2015 17:40:59 +0000 Subject: Testsuite: fix fallout from TLS-by-default Also handle testsuite run user different from testsuite files owner --- test/confs/0000 | 1 + test/log/2120 | 6 ++++++ test/runtest | 9 +++++++-- test/stderr/2120 | 8 ++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 test/stderr/2120 diff --git a/test/confs/0000 b/test/confs/0000 index 25474a063..a0c5072d6 100644 --- a/test/confs/0000 +++ b/test/confs/0000 @@ -8,5 +8,6 @@ spool_directory = DIR/spool log_file_path = DIR/spool/log/%slog gecos_pattern = "" gecos_name = CALLER_NAME +tls_advertise_hosts = # End diff --git a/test/log/2120 b/test/log/2120 index d27a6ef05..10e2316c0 100644 --- a/test/log/2120 +++ b/test/log/2120 @@ -1,4 +1,8 @@ +1999-03-02 09:44:33 Warning: No server certificate defined; TLS connections will fail. + Suggested action: either install a certificate or change tls_advertise_hosts option 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 Warning: No server certificate defined; TLS connections will fail. + Suggested action: either install a certificate or change tls_advertise_hosts option 1999-03-02 09:44:33 Start queue run: pid=pppp -qf 1999-03-02 09:44:33 10HmaX-0005vi-00 H=127.0.0.1 [127.0.0.1] TLS error on connection (SSL_connect): error: <> 1999-03-02 09:44:33 10HmaX-0005vi-00 TLS session failure: delivering unencrypted to 127.0.0.1 [127.0.0.1] (not in hosts_require_tls) @@ -7,6 +11,8 @@ 1999-03-02 09:44:33 End queue run: pid=pppp -qf ******** SERVER ******** +1999-03-02 09:44:33 Warning: No server certificate defined; TLS connections will fail. + Suggested action: either install a certificate or change tls_advertise_hosts option 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 1999-03-02 09:44:33 TLS error on connection from localhost (myhost.test.ex) [127.0.0.1] (SSL_accept): error: <> 1999-03-02 09:44:33 TLS client disconnected cleanly (rejected our certificate?) diff --git a/test/runtest b/test/runtest index 2ef749f33..be4c7b0fe 100755 --- a/test/runtest +++ b/test/runtest @@ -2458,8 +2458,13 @@ if ($parm_exim eq "") # deal with TRUSTED_CONFIG_LIST restrictions unlink("$parm_cwd/test-config") if -e "$parm_cwd/test-config"; -symlink("$parm_cwd/confs/0000", "$parm_cwd/test-config") - or die "Unable to link initial config into place: $!\n"; +open (IN, "$parm_cwd/confs/0000") || + tests_exit(-1, "Couldn't open $parm_cwd/confs/0000: $!\n"); +open (OUT, ">test-config") || + tests_exit(-1, "Couldn't open test-config: $!\n"); +while () { print OUT; } +close(IN); +close(OUT); print("Probing with config file: $parm_cwd/test-config\n"); open(EXIMINFO, "$parm_exim -d -C $parm_cwd/test-config -DDIR=$parm_cwd " . diff --git a/test/stderr/2120 b/test/stderr/2120 new file mode 100644 index 000000000..e16a6800b --- /dev/null +++ b/test/stderr/2120 @@ -0,0 +1,8 @@ +1999-03-02 09:44:33 Warning: No server certificate defined; TLS connections will fail. + Suggested action: either install a certificate or change tls_advertise_hosts option +1999-03-02 09:44:33 Warning: No server certificate defined; TLS connections will fail. + Suggested action: either install a certificate or change tls_advertise_hosts option + +******** SERVER ******** +1999-03-02 09:44:33 Warning: No server certificate defined; TLS connections will fail. + Suggested action: either install a certificate or change tls_advertise_hosts option -- cgit v1.2.3