Testsuite: OpenSSL/LibreSSL version output variances
[exim.git] / test / confs / 2102
1 # Exim test configuration 2102
2
3 .include DIR/aux-var/tls_conf_prefix
4
5 timezone = UTC
6 primary_hostname = myhost.test.ex
7
8 # ----- Main settings -----
9
10 acl_smtp_rcpt = check_recipient
11
12 log_selector = +tls_peerdn
13
14 queue_only
15 queue_run_in_order
16
17 tls_advertise_hosts = 127.0.0.1 : HOSTIPV4
18
19 .ifdef ORDER
20 tls_require_ciphers = ORDER
21 .endif
22
23 CA = DIR/aux-fixed/exim-ca
24 DRSA = CA/example.com
25 DECDSA = CA/example_ec.com
26
27 tls_certificate = DRSA/server1.example.com/server1.example.com.pem \
28                 : DECDSA/server1.example_ec.com/server1.example_ec.com.pem
29 tls_privatekey =  DRSA/server1.example.com/server1.example.com.unlocked.key \
30                 : DECDSA/server1.example_ec.com/server1.example_ec.com.unlocked.key
31
32 tls_verify_hosts = HOSTIPV4
33 tls_verify_certificates = DRSA/server2.example.com/ca_chain.pem
34
35
36 # ------ ACL ------
37
38 begin acl
39
40 check_recipient:
41   accept  hosts = :
42   deny    hosts = HOSTIPV4
43          !encrypted = *
44           logwrite = cipher: $tls_in_cipher
45 # This appears to lie. Despite what's on the wire, it returns the last cert loaded.
46   warn    logwrite =  ${if def:tls_in_ourcert \
47                 {Our cert SN: <${certextract{subject}{$tls_in_ourcert}}>} \
48                 {We did not present a cert}}
49   accept  condition = ${if !def:tls_in_peercert}
50           logwrite =  Peer did not present a cert
51   accept  logwrite =  Peer cert:
52           logwrite =  ver ${certextract {version}{$tls_in_peercert}}
53           logwrite =  SR  <${certextract {serial_number}{$tls_in_peercert}}>
54           logwrite =  SN  <${certextract {subject}      {$tls_in_peercert}}>
55           logwrite =  IN  <${certextract {issuer}       {$tls_in_peercert}}>
56           logwrite =  IN/O <${certextract {issuer,O}    {$tls_in_peercert}}>
57           logwrite =  NB/r <${certextract {notbefore,raw}       {$tls_in_peercert}}>
58           logwrite =  NB   <${certextract {notbefore}   {$tls_in_peercert}}>
59           logwrite =  NB/i <${certextract {notbefore,int}{$tls_in_peercert}}>
60           logwrite =  NA/i <${certextract {notafter,int}        {$tls_in_peercert}}>
61           logwrite =  NA   <${certextract {notafter}    {$tls_in_peercert}}>
62           logwrite =  SA  <${certextract {sig_algorithm}{$tls_in_peercert}}>
63           logwrite =  SG  <${certextract {signature}    {$tls_in_peercert}}>
64           logwrite =       ${certextract {subj_altname} {$tls_in_peercert} {SAN <$value>}{(no SAN)}}
65           logwrite =       ${certextract {ocsp_uri}     {$tls_in_peercert} {OCU <$value>}{(no OCU)}}
66           logwrite =       ${certextract {crl_uri}      {$tls_in_peercert} {CRU <$value>}{(no CRU)}}
67           logwrite =  md5    fingerprint ${md5:$tls_in_peercert}
68           logwrite =  sha1   fingerprint ${sha1:$tls_in_peercert}
69           logwrite =  sha256 fingerprint ${sha256:$tls_in_peercert}
70           logwrite =  der_b64 ${base64:$tls_in_peercert}
71
72
73 # ----- Routers -----
74
75 begin routers
76
77 abc:
78   driver = accept
79   retry_use_local_part
80   transport = local_delivery
81   headers_add = tls-certificate-verified: $tls_certificate_verified
82
83
84 # ----- Transports -----
85
86 begin transports
87
88 local_delivery:
89   driver = appendfile
90   file = DIR/test-mail/$local_part
91   headers_add = TLS: cipher=$tls_cipher peerdn=$tls_peerdn
92   user = CALLER
93
94 # End