1 # TLS server: general ops and certificate extractions
4 # Very early (unsure when) GnuTLS prefers RSA auth by default. Later, but before 3.6.x, prefers
5 # ECDSA but the client can be given a priority order to override that. We're running the server
6 # with no priority string given (tls_require_ciphers) hence default, and with both types of
7 # server cert loaded (RSA first, though we don't document that as relevant and in testing it
8 # does not appear to matter).
10 # GnuTLS 3.6.5 appears to ignore the client priority ordering, always choosing ECDSA if both
11 # are permitted, if TLS1.3 is permitted, so we limit to TLS1.2.
13 exim -DSERVER=server -bd -oX PORT_D
15 # Have the client do RSA (but support ECDSA as well). That should get us RSA on both older and newer GnuTLS.
16 client-gnutls -p NONE:+SIGN-RSA-SHA256:+SIGN-ECDSA-SHA512:+VERS-TLS1.2:+ECDHE-RSA:+DHE-RSA:+RSA:+CIPHER-ALL:+MAC-ALL:+COMP-NULL:+CURVE-ALL:+CTYPE-X509 127.0.0.1 PORT_D
33 mail from:<CALLER@test.ex>
35 rcpt to:<CALLER@test.ex>
39 This is a test encrypted message.
45 client-gnutls -p NONE:+SIGN-RSA-SHA256:+SIGN-ECDSA-SHA512:+VERS-TLS1.2:+ECDHE-RSA:+DHE-RSA:+RSA:+CIPHER-ALL:+MAC-ALL:+COMP-NULL:+CURVE-ALL:+CTYPE-X509 127.0.0.1 PORT_D
58 mail from:<"name with spaces"@test.ex>
60 rcpt to:<CALLER@test.ex>
64 This is a test encrypted message.
71 # Server asks for a client cert but client does not supply one
72 client-gnutls -p NONE:+SIGN-RSA-SHA256:+SIGN-ECDSA-SHA512:+VERS-TLS1.2:+ECDHE-RSA:+DHE-RSA:+RSA:+CIPHER-ALL:+MAC-ALL:+COMP-NULL:+CURVE-ALL:+CTYPE-X509 HOSTIPV4 PORT_D
86 # ensure sequence of log TLS error line
89 exim -DSERVER=server -bd -oX PORT_D
93 # Server asks for a client cert, and one is given which is verifiable by the server
94 client-gnutls -p NONE:+SIGN-RSA-SHA256:+SIGN-ECDSA-SHA512:+VERS-TLS1.2:+ECDHE-RSA:+DHE-RSA:+RSA:+CIPHER-ALL:+MAC-ALL:+COMP-NULL:+CURVE-ALL:+CTYPE-X509 HOSTIPV4 PORT_D DIR/aux-fixed/exim-ca/example.com/server2.example.com/server2.example.com.pem DIR/aux-fixed/exim-ca/example.com/server2.example.com/server2.example.com.unlocked.key
107 mail from:<CALLER@test.ex>
109 rcpt to:<CALLER@test.ex>
113 This is a test encrypted message from a verified host.
121 # A client that only talks RSA.
123 # We have to specify the key-exchange as well as the authentication, otherwise,
124 # the GnuTLS server side being foolish - it picks an ECDSA cipher-suite and then can't use it :(
125 # Possibly fixed in 3.6.x ?
126 client-gnutls -p NONE:+SIGN-RSA-SHA256:+VERS-TLS1.2:+ECDHE-RSA:+DHE-RSA:+RSA:+CIPHER-ALL:+MAC-ALL:+COMP-NULL:+CURVE-ALL:+CTYPE-X509 127.0.0.1 PORT_D
139 mail from:<CALLER@test.ex>
141 rcpt to:<CALLER@test.ex>
145 This is a test encrypted message.
146 It should be sent under the RSA server cert and with an RSA cipher.
154 # Make ECDSA authentication preferred (Older GnuTLS prefers RSA, it seems, Newer, ECDSA).
155 client-gnutls -p NONE:+SIGN-ECDSA-SHA512:+VERS-TLS1.2:+KX-ALL:+CIPHER-ALL:+MAC-ALL:+COMP-NULL:+CURVE-ALL:+CTYPE-X509 127.0.0.1 PORT_D
168 mail from:<CALLER@test.ex>
170 rcpt to:<CALLER@test.ex>
174 This is a test encrypted message.
175 It should be sent under the EC server cert and with an ECDSA cipher.
183 # clear out the queue
188 # STARTTLS used when not advertised