1 # TLS server: mandatory, optional, and revoked certificates
3 munge gnutls_unexpected
4 exim -DSERVER=server -bd -oX PORT_D
6 ### No certificate, certificate required
7 client-gnutls HOSTIPV4 PORT_D
21 ### No certificate, certificate optional at TLS time, required by ACL
22 client-gnutls 127.0.0.1 PORT_D
35 mail from:<userx@test.ex>
37 rcpt to:<userx@test.ex>
42 ### Good certificate, certificate required
43 client-gnutls HOSTIPV4 PORT_D aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.chain.pem aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key
56 mail from:<userx@test.ex>
58 rcpt to:<userx@test.ex>
63 ### Good certificate, certificate optional at TLS time, checked by ACL
64 client-gnutls 127.0.0.1 PORT_D aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.chain.pem aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key
77 mail from:<userx@test.ex>
79 rcpt to:<userx@test.ex>
84 ### Bad certificate, certificate required
85 # Actually this test does not have the client presenting a cert at all, as it filters what it has
86 # by the options offered by the server first. So it's not a good testcase.
87 client-gnutls HOSTIPV4 PORT_D aux-fixed/exim-ca/example.net/server1.example.net/server1.example.net.chain.pem aux-fixed/exim-ca/example.net/server1.example.net/server1.example.net.unlocked.key
101 ### Bad certificate, certificate optional at TLS time, reject at ACL time
102 # (situation as above)
103 client-gnutls 127.0.0.1 PORT_D aux-fixed/exim-ca/example.net/server1.example.net/server1.example.net.chain.pem aux-fixed/exim-ca/example.net/server1.example.net/server1.example.net.unlocked.key
116 mail from:<userx@test.ex>
118 rcpt to:<userx@test.ex>
128 exim -DCRL=DIR/aux-fixed/exim-ca/example.com/CA/crl.v2.pem -DSERVER=server -bd -oX PORT_D
130 ### Otherwise good but revoked certificate, certificate required
131 # The trace for this test appears in the mainlog
132 # - but the stdout from the client is a problem: the server sends a TLS ALERT. If the client sees that early enough
133 # then it says that + "Failed to start TLS". But if it's later, it says "Succeeded in starting TLS"
134 # and only another command from the client elicits anything from the server (eg "554 Security failure").
135 # How can we test this?
136 # An option on client to be quiet about tls problems.
138 # GnuTLS seems to not mind the lack of CRLs for the nonleaf certs in the chain, unlike under OpenSSL
139 client-gnutls -tls-quiet HOSTIPV4 PORT_D aux-fixed/exim-ca/example.com/revoked1.example.com/revoked1.example.com.chain.pem aux-fixed/exim-ca/example.com/revoked1.example.com/revoked1.example.com.unlocked.key
151 ??? 554 Security failure
155 ### Revoked certificate, certificate optional at TLS time, reject at ACL time
156 client-gnutls 127.0.0.1 PORT_D aux-fixed/exim-ca/example.com/revoked1.example.com/revoked1.example.com.chain.pem aux-fixed/exim-ca/example.com/revoked1.example.com/revoked1.example.com.unlocked.key
169 mail from:<userx@test.ex>
171 rcpt to:<userx@test.ex>
176 ### Good certificate, certificate required - but nonmatching CRL also present
177 client-gnutls HOSTIPV4 PORT_D aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.chain.pem aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key
190 mail from:<userx@test.ex>
192 rcpt to:<userx@test.ex>