1# The client writes a message to Sys::Syslog native method. 2# The syslogd writes it into a file and through a pipe. 3# The syslogd passes it via TLS to localhost loghost. 4# The server offers only the null cipher, works only with TLS 1.2. 5# Find the message in client, file, pipe, syslogd log. 6# Check that server log contains the no shared cipher error. 7 8use strict; 9use warnings; 10use Socket; 11 12our %args = ( 13 syslogd => { 14 loghost => '@tls://localhost:$connectport', 15 loggrep => { 16 qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4', 17 qr/syslogd\[\d+\]: loghost .* connection error: /. 18 qr/handshake failed: error:.*:SSL routines:/. 19 qr/.*CONNECT.*:sslv3 alert handshake failure/ => 1, 20 get_testgrep() => 1, 21 }, 22 cacrt => "ca.crt", 23 }, 24 server => { 25 listen => { domain => AF_UNSPEC, proto => "tls", addr => "localhost" }, 26 sslciphers => "NULL", 27 sslversion => "TLSv1_2", 28 up => "IO::Socket::SSL socket accept failed", 29 down => "Server", 30 exit => 255, 31 loggrep => { 32 qr/listen sock: (127.0.0.1|::1) \d+/ => 1, 33 qr/SSL routines:ACCEPT_SR_CLNT_HELLO_C:no shared cipher/ => 1, 34 get_testgrep() => 0, 35 }, 36 }, 37); 38 391; 40