[exim-cvs] Testsuite basics.

Etusivu
Poista viesti
Vastaa
Lähettäjä: Exim Git Commits Mailing List
Päiväys:  
Vastaanottaja: exim-cvs
Aihe: [exim-cvs] Testsuite basics.
Gitweb: http://git.exim.org/exim.git/commitdiff/12ee8cf9db5b6c81b0e492c64f305d7ba1cf4dc2
Commit:     12ee8cf9db5b6c81b0e492c64f305d7ba1cf4dc2
Parent:     868f567254760f9414689debe3639bc190dcc97e
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Aug 8 20:45:24 2014 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Fri Aug 8 20:45:24 2014 +0100


    Testsuite basics.


    Not actually excercising DANE yet,
    this will take additions in the fakedns and
    probably changes in certificates.
---
 src/src/tls-openssl.c                              |    3 +-
 test/confs/5800                                    |   74 ++++++++++++++++++++
 test/confs/5850                                    |   72 +++++++++++++++++++
 test/log/5850                                      |   13 ++++
 test/scripts/2100-OpenSSL/2100                     |    2 +-
 .../{2100-OpenSSL/2100 => 5800-DANE-GnuTLS/5800}   |   10 ++-
 test/scripts/5800-DANE-GnuTLS/REQUIRES             |    3 +
 .../{2100-OpenSSL/2100 => 5850-DANE-OpenSSL/5850}  |    8 ++-
 test/scripts/5850-DANE-OpenSSL/REQUIRES            |    3 +
 9 files changed, 180 insertions(+), 8 deletions(-)


diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 8a4e5a7..201636d 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -1829,7 +1829,8 @@ rc = SSL_connect(client_ssl);
alarm(0);

 #ifdef EXPERIMENTAL_DANE
-DANESSL_cleanup(client_ssl);    /*XXX earliest possible callpoint. Too early? */
+if (dane)
+  DANESSL_cleanup(client_ssl);    /*XXX earliest possible callpoint. Too early? */
 #endif


if (rc <= 0)
diff --git a/test/confs/5800 b/test/confs/5800
new file mode 100644
index 0000000..f1bd09d
--- /dev/null
+++ b/test/confs/5800
@@ -0,0 +1,74 @@
+# Exim test configuration 5800
+# DANE
+
+SERVER=
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+rfc1413_query_timeout = 0s
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/SERVER%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+
+log_selector = +tls_peerdn
+
+queue_only
+queue_run_in_order
+
+tls_advertise_hosts = *
+# needed to force generation
+tls_dhparam = historic
+
+# Set certificate only if server
+
+tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
+tls_privatekey = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
+
+#tls_verify_hosts = *
+#tls_verify_certificates = ${if eq {SERVER}{server}{DIR/aux-fixed/cert2}fail}
+
+
+# ----- Routers -----
+
+begin routers
+
+client:
+ driver = accept
+ condition = ${if eq {SERVER}{server}{no}{yes}}
+ retry_use_local_part
+ transport = send_to_server
+
+server:
+ driver = redirect
+ data = :blackhole:
+
+
+# ----- Transports -----
+
+begin transports
+
+send_to_server:
+ driver = smtp
+ allow_localhost
+ hosts = 127.0.0.1
+ port = PORT_D
+# tls_certificate = DIR/aux-fixed/cert2
+# tls_privatekey = DIR/aux-fixed/cert2
+# tls_verify_certificates = DIR/aux-fixed/cert2
+
+
+# ----- Retry -----
+
+
+begin retry
+
+* * F,5d,10s
+
+
+# End
diff --git a/test/confs/5850 b/test/confs/5850
new file mode 100644
index 0000000..ac967fc
--- /dev/null
+++ b/test/confs/5850
@@ -0,0 +1,72 @@
+# Exim test configuration 5850
+# DANE
+
+SERVER=
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+rfc1413_query_timeout = 0s
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/SERVER%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+
+log_selector = +tls_peerdn
+
+queue_only
+queue_run_in_order
+
+tls_advertise_hosts = *
+
+# Set certificate only if server
+
+tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
+tls_privatekey = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
+
+#tls_verify_hosts = *
+#tls_verify_certificates = ${if eq {SERVER}{server}{DIR/aux-fixed/cert2}fail}
+
+
+# ----- Routers -----
+
+begin routers
+
+client:
+ driver = accept
+ condition = ${if eq {SERVER}{server}{no}{yes}}
+ retry_use_local_part
+ transport = send_to_server
+
+server:
+ driver = redirect
+ data = :blackhole:
+
+
+# ----- Transports -----
+
+begin transports
+
+send_to_server:
+ driver = smtp
+ allow_localhost
+ hosts = 127.0.0.1
+ port = PORT_D
+# tls_certificate = DIR/aux-fixed/cert2
+# tls_privatekey = DIR/aux-fixed/cert2
+# tls_verify_certificates = DIR/aux-fixed/cert2
+
+
+# ----- Retry -----
+
+
+begin retry
+
+* * F,5d,10s
+
+
+# End
diff --git a/test/log/5850 b/test/log/5850
new file mode 100644
index 0000000..2913e7c
--- /dev/null
+++ b/test/log/5850
@@ -0,0 +1,13 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@??? U=CALLER P=local S=sss
+1999-03-02 09:44:33 Start queue run: pid=pppp -qf
+1999-03-02 09:44:33 10HmaX-0005vi-00 => CALLER@??? R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLSv1:AES256-SHA:256 DN="/C=UK/O=The Exim Maintainers/OU=Test Suite/CN=Phil Pennock" C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp -qf
+
+******** SERVER ********
+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 10HmaY-0005vi-00 <= CALLER@??? H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLSv1:AES256-SHA:256 S=sss id=E10HmaX-0005vi-00@???
+1999-03-02 09:44:33 Start queue run: pid=pppp -qf
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <CALLER@???> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp -qf
diff --git a/test/scripts/2100-OpenSSL/2100 b/test/scripts/2100-OpenSSL/2100
index 61c2fd6..c2b0f89 100644
--- a/test/scripts/2100-OpenSSL/2100
+++ b/test/scripts/2100-OpenSSL/2100
@@ -4,7 +4,7 @@ exim -DSERVER=server -bd -oX PORT_D
exim CALLER@???
Testing
****
-exim -d+all -qf
+exim -qf
****
killdaemon
no_msglog_check
diff --git a/test/scripts/2100-OpenSSL/2100 b/test/scripts/5800-DANE-GnuTLS/5800
similarity index 51%
copy from test/scripts/2100-OpenSSL/2100
copy to test/scripts/5800-DANE-GnuTLS/5800
index 61c2fd6..07ad740 100644
--- a/test/scripts/2100-OpenSSL/2100
+++ b/test/scripts/5800-DANE-GnuTLS/5800
@@ -1,10 +1,14 @@
-# TLS client: TLS setup fails - retry in clear
+# DANE client: general
+#
+gnutls
+#
exim -DSERVER=server -bd -oX PORT_D
****
exim CALLER@???
Testing
****
-exim -d+all -qf
+exim -qf
****
killdaemon
-no_msglog_check
+exim -DSERVER=server -DNOTDAEMON -qf
+****
diff --git a/test/scripts/5800-DANE-GnuTLS/REQUIRES b/test/scripts/5800-DANE-GnuTLS/REQUIRES
new file mode 100644
index 0000000..4234c92
--- /dev/null
+++ b/test/scripts/5800-DANE-GnuTLS/REQUIRES
@@ -0,0 +1,3 @@
+support Experimental_DANE
+support GnuTLS
+running IPv4
diff --git a/test/scripts/2100-OpenSSL/2100 b/test/scripts/5850-DANE-OpenSSL/5850
similarity index 53%
copy from test/scripts/2100-OpenSSL/2100
copy to test/scripts/5850-DANE-OpenSSL/5850
index 61c2fd6..419930e 100644
--- a/test/scripts/2100-OpenSSL/2100
+++ b/test/scripts/5850-DANE-OpenSSL/5850
@@ -1,10 +1,12 @@
-# TLS client: TLS setup fails - retry in clear
+# DANE client: general
+#
exim -DSERVER=server -bd -oX PORT_D
****
exim CALLER@???
Testing
****
-exim -d+all -qf
+exim -qf
****
killdaemon
-no_msglog_check
+exim -DSERVER=server -DNOTDAEMON -qf
+****
diff --git a/test/scripts/5850-DANE-OpenSSL/REQUIRES b/test/scripts/5850-DANE-OpenSSL/REQUIRES
new file mode 100644
index 0000000..59cb7dc
--- /dev/null
+++ b/test/scripts/5850-DANE-OpenSSL/REQUIRES
@@ -0,0 +1,3 @@
+support Experimental_DANE
+support OpenSSL
+running IPv4