Skip a PHA test if Net::SSLeay does not expose the PHA

This commit is contained in:
Petr Písař 2019-06-17 09:35:43 +02:00
parent e271cbabf5
commit a2fab409c1
2 changed files with 21 additions and 15 deletions

View File

@ -1,4 +1,4 @@
From 921d3a471156896a0d139e82a50d07441992c811 Mon Sep 17 00:00:00 2001
From 6b05dc28e94e90ab4852c9977d7fbe66fec6cd48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 8 Feb 2019 14:50:32 +0100
Subject: [PATCH] Test client performs Post-Handshake-Authentication
@ -13,15 +13,15 @@ port. So the test can fail.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
MANIFEST | 1 +
t/pha_client.t | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 88 insertions(+)
t/pha_client.t | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 91 insertions(+)
create mode 100755 t/pha_client.t
diff --git a/MANIFEST b/MANIFEST
index 5c2b87c..e46f919 100644
index 20cddb6..2b8328d 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -57,6 +57,7 @@ t/memleak_bad_handshake.t
@@ -57,6 +57,7 @@ t/mitm.t
t/multiple-cert-rsa-ecc.t
t/nonblock.t
t/npn.t
@ -31,22 +31,25 @@ index 5c2b87c..e46f919 100644
t/public_suffix_lib_encode_idn.t
diff --git a/t/pha_client.t b/t/pha_client.t
new file mode 100755
index 0000000..6699443
index 0000000..2413588
--- /dev/null
+++ b/t/pha_client.t
@@ -0,0 +1,87 @@
@@ -0,0 +1,90 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Test::More;
+use IPC::Run ();
+use IO::Socket::SSL ();
+use Net::SSLeay ();
+use IO::Select ();
+
+if (!system('openssl', 'version')) {
+ plan tests => 5;
+} else {
+if (system('openssl', 'version')) {
+ plan skip_all => 'openssl tool is not available';
+} elsif (!defined &Net::SSLeay::CTX_set_post_handshake_auth) {
+ plan skip_all => 'Net::SSLeay does not expose PHA';
+} else {
+ plan tests => 5;
+}
+
+my $port = 2000;
@ -123,5 +126,5 @@ index 0000000..6699443
+ok(!$@, 'Server terminated');
+
--
2.17.2
2.20.1

View File

@ -1,6 +1,6 @@
Name: perl-IO-Socket-SSL
Version: 2.066
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Perl library for transparent SSL
License: GPL+ or Artistic
URL: https://metacpan.org/release/IO-Socket-SSL
@ -9,7 +9,7 @@ Patch0: IO-Socket-SSL-2.066-use-system-default-cipher-list.patch
Patch1: IO-Socket-SSL-2.066-use-system-default-SSL-version.patch
# A test for Enable-Post-Handshake-Authentication-TLSv1.3-feature.patch,
# bug #1632660, requires openssl tool
Patch4: IO-Socket-SSL-2.063-Test-client-performs-Post-Handshake-Authentication.patch
Patch2: IO-Socket-SSL-2.066-Test-client-performs-Post-Handshake-Authentication.patch
BuildArch: noarch
# Module Build
BuildRequires: coreutils
@ -93,8 +93,8 @@ mod_perl.
# Use system-default SSL version too
%patch1
# Add test for PHA
%patch4 -p1
# Add a test for PHA
%patch2 -p1
%build
NO_NETWORK_TESTING=1 perl Makefile.PL INSTALLDIRS=vendor
@ -121,6 +121,9 @@ make test
%{_mandir}/man3/IO::Socket::SSL::Utils.3*
%changelog
* Mon Jun 17 2019 Petr Pisar <ppisar@redhat.com> - 2.066-3
- Skip a PHA test if Net::SSLeay does not expose the PHA (bug #1632660)
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 2.066-2
- Perl 5.30 rebuild