Fix cert-try-verify when denied by event action
[users/heiko/exim.git] / test / confs / 5760
index 0e11ab0d30edd21357b8bd4283e597bac8af25b7..d07aa8d9046db2c51733c5a72a586e71d024eb11 100644 (file)
@@ -29,13 +29,28 @@ tls_privatekey = DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.e
 tls_verify_hosts = *
 tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server2.example.com/ca_chain.pem
 
+event_action = ${acl {server_cert_log}}
+
 #
 
 begin acl
-logger:
-  warn   logwrite =  $acl_arg1 $tpda_delivery_local_part
+
+server_cert_log:
+  accept condition = ${if eq {tls:cert}{$event_name}}
+        logwrite =  [$sender_host_address] \
+                       depth=$event_data \
+                       ${certextract{subject}{$tls_in_peercert}}
+  accept
+
+ev_tls:
+  accept logwrite =  $event_name depth=$event_data \
+                       <${certextract {subject} {$tls_out_peercert}}>
+#       message = nooooo
+
+ev_msg:
+  warn   logwrite =  $acl_arg1 $local_part
   warn   logwrite =  ${if !def:tls_out_ourcert \
-               {NO CLENT CERT presented} \
+               {NO CLIENT CERT presented} \
                {Our cert SN: ${certextract{subject}{$tls_out_ourcert}}}}
   accept condition = ${if !def:tls_out_peercert}
         logwrite =  No Peer cert
@@ -45,12 +60,18 @@ logger:
          logwrite =  IN  <${certextract {issuer}       {$tls_out_peercert}}>
          logwrite =  NB  <${certextract {notbefore}    {$tls_out_peercert}}>
          logwrite =  NA  <${certextract {notafter}     {$tls_out_peercert}}>
-         logwrite =  SA  <${certextract {signature_algorithm}{$tls_out_peercert}}>
+         logwrite =  SA  <${certextract {sig_algorithm} {$tls_out_peercert}}>
          logwrite =  SG  <${certextract {signature}    {$tls_out_peercert}}>
-        logwrite =       ${certextract {subject_altname}{$tls_out_peercert}{SAN <$value>}{(no SAN)}}
+        logwrite = ${certextract {subj_altname,>;}{$tls_out_peercert}{SAN <$value>}{(no SAN)}}
         logwrite =       ${certextract {ocsp_uri}      {$tls_out_peercert} {OCU <$value>}{(no OCU)}}
         logwrite =       ${certextract {crl_uri}       {$tls_out_peercert} {CRU <$value>}{(no CRU)}}
 
+logger:
+  accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}}
+        acl =       ev_msg $event_name $acl_arg2
+  accept condition = ${if eq {tls} {${listextract{1}{$event_name}}}}
+        message =   ${acl {ev_tls}}
+  accept
 
 # ----- Routers -----
 
@@ -81,8 +102,7 @@ send_to_server:
 {example.com/server1.example.com/ca_chain.pem}\
 {example.net/server1.example.net/ca_chain.pem}}
 
-  tpda_delivery_action =   ${acl {logger} {delivery} {$domain} }
-  tpda_host_defer_action = ${acl {logger} {deferral} {$domain} }
+  event_action =   ${acl {logger} {$event_name} {$domain} }
 
 # ----- Retry -----