Testsuite: handle OpenSSL 1.1.1
authorJeremy Harris <jgh146exb@wizmail.org>
Fri, 21 Sep 2018 12:31:36 +0000 (13:31 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Fri, 21 Sep 2018 12:40:31 +0000 (13:40 +0100)
There are no functional changes as a result of this.

(Cherry-picked from 9e9ad3eea1)

test/confs/2102
test/confs/2107
test/confs/2111
test/confs/2125
test/confs/2127
test/confs/5841
test/log/2107
test/runtest
test/scripts/5840-DANE-OpenSSL/5841

index 0139a61c093873a20ccfbd295fea53056f6b114e..c9e00479bfc11ebebceb3da4e3c952e470671394 100644 (file)
@@ -43,6 +43,7 @@ check_recipient:
          !encrypted = *
          logwrite = cipher: $tls_in_cipher
 # This appears to lie. Despite what's on the wire, it returns the last cert loaded.
+# Fixed in OpenSSL 1.1.1 ?  Testcase golden logfile has the incorrect value.
   warn    logwrite =  ${if def:tls_in_ourcert \
                {Our cert SN: <${certextract{subject}{$tls_in_ourcert}}>} \
                {We did not present a cert}}
index 67936731531ba8b35aec45297cd8ef4e4eec1880..9487445ccae2652e6d2487f9bf60513f00262d3e 100644 (file)
@@ -16,7 +16,6 @@ queue_only
 queue_run_in_order
 
 tls_advertise_hosts = *
-tls_require_ciphers = AES256-SHA
 
 # Set certificate only if server
 
index 0d99a23bcd20e595b0e9919e90dea5f44eda0ba4..b54c9490d26e7d70df568bdd941c0a540f1601b9 100644 (file)
@@ -23,6 +23,9 @@ 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}
 
+.ifdef _OPT_OPENSSL_NO_TLSV1_3_X
+openssl_options = +no_tlsv1_3
+.endif
 
 # ----- Routers -----
 
@@ -47,7 +50,7 @@ send_to_server:
   port = PORT_D
   tls_certificate = DIR/aux-fixed/cert2
   tls_privatekey = DIR/aux-fixed/cert2
-  tls_require_ciphers = IDEA-CBC-MD5 \
+  tls_require_ciphers = IDEA-CBC-MD5:\
     ${if eq{$host_address}{127.0.0.1}{:AES256-SHA:RSA_ARCFOUR_SHA}}
 
 # End
index be2fe1be30baae8b721c69c603f8de40f5adbe8d..5898791337eaa4953d3e30cec1898b4be19fc75b 100644 (file)
@@ -25,6 +25,9 @@ tls_require_ciphers = ${if eq{$sender_host_address}{HOSTIPV4}\
 tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
 tls_privatekey = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
 
+.ifdef _OPT_OPENSSL_NO_TLSV1_3_X
+openssl_options = +no_tlsv1_3
+.endif
 
 # ----- Routers -----
 
index b177444e92f43cdd1a32248db52c145dbb4ae6b3..9807ccf11dfa74de2dda0b75a23169946c819978 100644 (file)
@@ -20,6 +20,10 @@ tls_try_verify_hosts = 127.0.0.1
 tls_verify_hosts = HOSTIPV4
 tls_verify_certificates = DIR/aux-fixed/cert1
 
+tls_require_ciphers = -ALL:kRSA
+.ifdef _OPT_OPENSSL_NO_TLSV1_3_X
+openssl_options = +no_tlsv1_3
+.endif
 # ----- Routers -----
 
 begin routers
index 57d692826af3dd3181075029e3c0adb69346b026..98de91d76033bce6d8065bcff159fad22e8d6b43 100644 (file)
@@ -2,7 +2,7 @@
 # DANE/OpenSSL - ciphers option
 
 SERVER=
-OPT=
+LIST=
 
 .include DIR/aux-var/tls_conf_prefix
 
@@ -25,6 +25,12 @@ tls_privatekey =  ${if eq {SERVER}{server} {CDIR2/server1.example.com.unlocked.k
 # Permit two specific ciphers
 tls_require_ciphers = ECDHE-RSA-CAMELLIA256-SHA384:ECDHE-RSA-AES256-GCM-SHA384
 
+# Force TLS1.2 so that the ciphers choice works
+
+.ifdef _OPT_OPENSSL_NO_TLSV1_3_X
+openssl_options = +no_tlsv1_3
+.endif
+
 # ----- Routers -----
 begin routers
 
@@ -53,7 +59,7 @@ send_to_server:
 
   # Some commonly-available cipher, we hope
   tls_require_ciphers =                ECDHE-RSA-AES256-GCM-SHA384
-  dane_require_tls_ciphers =   OPT
+  dane_require_tls_ciphers =   LIST
 
 # ----- Retry -----
 begin retry
index a09c37c5f8f1dcd96c760bed01a8286ca6f42a21..1d01706c13896e485b69cc5c15e23841c2897c67 100644 (file)
@@ -2,10 +2,10 @@
 1999-03-02 09:44:33 Start queue run: pid=pppp -qf
 1999-03-02 09:44:33 10HmaX-0005vi-00 [127.0.0.1] SSL verify error: depth=0 error=self signed certificate cert=/C=UK/O=The Exim Maintainers/OU=Test Suite/CN=Phil Pennock
 1999-03-02 09:44:33 10HmaX-0005vi-00 [127.0.0.1] SSL verify error: certificate name mismatch: DN="/C=UK/O=The Exim Maintainers/OU=Test Suite/CN=Phil Pennock" H="127.0.0.1"
-1999-03-02 09:44:33 10HmaX-0005vi-00 => userx@test.ex R=client T=send_to_server1 H=127.0.0.1 [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no 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 => userx@test.ex R=client T=send_to_server1 H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no 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@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLSv1:AES256-SHA:256 CV=no S=sss id=E10HmaX-0005vi-00@myhost.test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no S=sss id=E10HmaX-0005vi-00@myhost.test.ex
index 5c6d3cb144f2bd3b9e7f5b13e85e949087a8d11b..5f7fff8b5f9587a4c510c50c0166c7cd0c5fe46d 100755 (executable)
@@ -533,6 +533,9 @@ RESET_AFTER_EXTRA_LINE_READ:
   # Test machines might have various different TLS library versions supporting
   # different protocols; can't rely upon TLS 1.2's AES256-GCM-SHA384, so we
   # treat the standard algorithms the same.
+  #
+  # TLSversion : KeyExchange? - Authentication/Signature - C_iph_er - MAC : ???
+  #
   # So far, have seen:
   #   TLSv1:AES128-GCM-SHA256:128
   #   TLSv1:AES256-SHA:256
@@ -552,6 +555,14 @@ RESET_AFTER_EXTRA_LINE_READ:
   s/((EC)?DHE-)?(RSA|ECDSA)-AES(128|256)-(GCM-SHA(256|384)|SHA)(?!:)/ke-$3-AES256-SHA/g;
   s/((EC)?DHE-)?(RSA|ECDSA)-AES(128|256)-(GCM-SHA(256|384)|SHA):(128|256)/ke-$3-AES256-SHA:xxx/g;
 
+  # OpenSSL TLSv1.3 - unsure what to do about the authentication-variant testcases now,
+  # as it seems the protocol no longer supports a user choice.  Replace the "TLS" field with "RSA".
+  # Also insert a key-exchange field for back-compat, even though 1.3 doesn't do that.
+  #
+  # TLSversion : "TLS" - C_iph_er - MAC : ???
+  #
+  s/:TLS_AES(_256)_GCM_SHA384:256/:ke-RSA-AES256-SHA:xxx/g;
+
   # LibreSSL
   # TLSv1:AES256-GCM-SHA384:256
   # TLSv1:ECDHE-RSA-CHACHA20-POLY1305:256
index 52fac186aa9c0a1a23cda5b564ca59dd3968d0c6..fff416e2a754c82d92d3765f4484c041e94ed1eb 100644 (file)
@@ -15,12 +15,12 @@ Testing
 #
 ### Dane cipher specified, dane unused
 # Since dane unused, should get the same cipher as the baseline
-exim -odf -DOPT=ECDHE-RSA-CAMELLIA256-SHA384 CALLER@localhost.test.ex
+exim -odf -DLIST=ECDHE-RSA-CAMELLIA256-SHA384 CALLER@localhost.test.ex
 Testing
 ****
 ### Dane cipher specified, dane used
 # Should get the cipher specified here
-exim -odf -DOPT=ECDHE-RSA-CAMELLIA256-SHA384 CALLER@dane256ee.test.ex
+exim -odf -DLIST=ECDHE-RSA-CAMELLIA256-SHA384 CALLER@dane256ee.test.ex
 Testing
 ****
 #