diff options
author | Eric Wong <e@80x24.org> | 2022-09-21 17:02:54 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-09-21 17:12:44 +0000 |
commit | fbe89926961e2e090481fa283048c31aaddc17cf (patch) | |
tree | ffe74cd7ccf61cff6b5e2e8c065bd81c8e8adf94 | |
parent | c1e7a048be9d32cdca943bb3b7f935ed28768d4d (diff) | |
download | public-inbox-fbe89926961e2e090481fa283048c31aaddc17cf.tar.gz |
This test could be written with optional OpenSSL dependencies, but it's probably not worth it since IO::Socket::SSL seems pretty common. Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://public-inbox.org/meta/20220921154741.siubptwcv4463w5l@pengutronix.de/
-rw-r--r-- | t/pop3d.t | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -4,6 +4,13 @@ use v5.12; use PublicInbox::TestCommon; use Socket qw(IPPROTO_TCP SOL_SOCKET); +my $cert = 'certs/server-cert.pem'; +my $key = 'certs/server-key.pem'; +unless (-r $key && -r $cert) { + plan skip_all => + "certs/ missing for $0, run $^X ./create-certs.perl in certs/"; +} + # Net::POP3 is part of the standard library, but distros may split it off... require_mods(qw(DBD::SQLite Net::POP3 IO::Socket::SSL)); require_git('2.6'); # for v2 @@ -44,14 +51,6 @@ my $pop3s_addr = tcp_host_port($pop3s); my $stls_addr = tcp_host_port($stls); my $plain_addr = tcp_host_port($plain); my $env = { PI_CONFIG => $pi_config }; -my $cert = 'certs/server-cert.pem'; -my $key = 'certs/server-key.pem'; - -unless (-r $key && -r $cert) { - plan skip_all => - "certs/ missing for $0, run $^X ./create-certs.perl in certs/"; -} - my $old = start_script(['-pop3d', '-W0', "--stdout=$tmpdir/plain.out", "--stderr=$olderr" ], $env, { 3 => $plain }); |