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
22 ### No certificate, certificate optional at TLS time, required by ACL
23 client-gnutls 127.0.0.1 PORT_D
37 mail from:<userx@test.ex>
39 rcpt to:<userx@test.ex>
44 ### Good certificate, certificate required
45 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
59 mail from:<userx@test.ex>
61 rcpt to:<userx@test.ex>
66 ### Good certificate, certificate optional at TLS time, checked by ACL
67 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
81 mail from:<userx@test.ex>
83 rcpt to:<userx@test.ex>
88 ### Bad certificate, certificate required
89 # Actually this test does not have the client presenting a cert at all, as it filters what it has
90 # by the options offered by the server first. So it's not a good testcase.
91 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
106 ### Bad certificate, certificate optional at TLS time, reject at ACL time
107 # (situation as above)
108 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
122 mail from:<userx@test.ex>
124 rcpt to:<userx@test.ex>
134 exim -DCRL=DIR/aux-fixed/exim-ca/example.com/CA/crl.v2.pem -DSERVER=server -bd -oX PORT_D
136 ### Otherwise good but revoked certificate, certificate required
137 # The trace for this test appears in the mainlog
138 # - but the stdout from the client is a problem: the server sends a TLS ALERT. If the client sees that early enough
139 # then it says that + "Failed to start TLS". But if it's later, it says "Succeeded in starting TLS"
140 # and only another command from the client elicits anything from the server (eg "554 Security failure").
141 # How can we test this?
142 # An option on client to be quiet about tls problems.
144 # GnuTLS seems to not mind the lack of CRLs for the nonleaf certs in the chain, unlike under OpenSSL
145 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
158 ??? 554 Security failure
162 ### Revoked certificate, certificate optional at TLS time, reject at ACL time
163 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
177 mail from:<userx@test.ex>
179 rcpt to:<userx@test.ex>
184 ### Good certificate, certificate required - but nonmatching CRL also present
185 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
199 mail from:<userx@test.ex>
201 rcpt to:<userx@test.ex>