From: bluhm Date: Mon, 19 Apr 2021 10:58:31 +0000 (+0000) Subject: Fix TLS error message race. Due to less handshakes in TLS 1.3 an X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cee623ccd7642a1c73ce99110ce82a853cff7630;p=openbsd Fix TLS error message race. Due to less handshakes in TLS 1.3 an EPIPE error may be reported instead of a TLS alert. --- diff --git a/regress/usr.sbin/syslogd/args-tls-cafile-default.pl b/regress/usr.sbin/syslogd/args-tls-cafile-default.pl index 440733185ab..a77977117fe 100644 --- a/regress/usr.sbin/syslogd/args-tls-cafile-default.pl +++ b/regress/usr.sbin/syslogd/args-tls-cafile-default.pl @@ -7,8 +7,12 @@ use strict; use warnings; +use Errno ':POSIX'; use Socket; +my @errors = (EPIPE); +my $errors = "(". join("|", map { $! = $_ } @errors). ")"; + our %args = ( syslogd => { loghost => '@tls://localhost:$connectport', @@ -32,8 +36,9 @@ our %args = ( exit => 255, loggrep => { qr/listen sock: (127.0.0.1|::1) \d+/ => 1, - qr/SSL accept attempt failed error:/. - qr/.*ST_ACCEPT:tlsv1 alert unknown ca/ => 1, + qr/IO::Socket::SSL socket accept failed: /. + qr/.*,SSL accept attempt failed error:.*/. + qr/(ST_ACCEPT:tlsv1 alert unknown ca|$errors)/ => 1, get_testgrep() => 0, }, },