[Pkg-openssl-changes] r910 - in openssl/branches/1.1.0/debian: . patches
Kurt Roeckx
kroeckx at moszumanska.debian.org
Sun Aug 6 21:55:55 UTC 2017
Author: kroeckx
Date: 2017-08-06 21:55:55 +0000 (Sun, 06 Aug 2017)
New Revision: 910
Added:
openssl/branches/1.1.0/debian/patches/Fix-a-Proxy-race-condition.patch
Modified:
openssl/branches/1.1.0/debian/changelog
openssl/branches/1.1.0/debian/patches/series
Log:
Fix a race in the test suite
Modified: openssl/branches/1.1.0/debian/changelog
===================================================================
--- openssl/branches/1.1.0/debian/changelog 2017-08-06 21:40:47 UTC (rev 909)
+++ openssl/branches/1.1.0/debian/changelog 2017-08-06 21:55:55 UTC (rev 910)
@@ -8,8 +8,9 @@
version. This will likely break things, but the hope is that by
the release of Buster everything will speak at least TLS 1.2. This will be
reconsidered before the Buster release.
+ * Fix a race condition in the test suite (Closes: #869856)
- -- Kurt Roeckx <kurt at roeckx.be> Sun, 06 Aug 2017 23:40:02 +0200
+ -- Kurt Roeckx <kurt at roeckx.be> Sun, 06 Aug 2017 23:53:29 +0200
openssl (1.1.0f-3) unstable; urgency=medium
Added: openssl/branches/1.1.0/debian/patches/Fix-a-Proxy-race-condition.patch
===================================================================
--- openssl/branches/1.1.0/debian/patches/Fix-a-Proxy-race-condition.patch (rev 0)
+++ openssl/branches/1.1.0/debian/patches/Fix-a-Proxy-race-condition.patch 2017-08-06 21:55:55 UTC (rev 910)
@@ -0,0 +1,81 @@
+From 523ea2721581cf9eaa20036327b53b36ba2135ba Mon Sep 17 00:00:00 2001
+From: Matt Caswell <matt at openssl.org>
+Date: Fri, 26 May 2017 13:06:08 +0100
+Subject: [PATCH] Fix a Proxy race condition
+
+Issue #3562 describes a problem where a race condition can occur in the
+Proxy such that a test "ok" line can appear in the middle of other text
+causing the test harness to miss it. The issue is that we do not wait for
+the client process to finish after the test is complete, so that process may
+continue to write data to stdout/stderr at the same time that the test
+harness does.
+
+This commit fixes TLSProxy so that we always wait for the client process to
+finish before continuing.
+
+Fixes #3562
+
+Reviewed-by: Richard Levitte <levitte at openssl.org>
+(Merged from https://github.com/openssl/openssl/pull/3567)
+(cherry picked from commit b72668a0d3586ee2560f0536c43e18991a4cfc6f)
+---
+ util/TLSProxy/Proxy.pm | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/util/TLSProxy/Proxy.pm b/util/TLSProxy/Proxy.pm
+index bdb2cd8b5c..141cf53982 100644
+--- a/util/TLSProxy/Proxy.pm
++++ b/util/TLSProxy/Proxy.pm
+@@ -42,6 +42,7 @@ sub new
+ clientflags => "",
+ serverconnects => 1,
+ serverpid => 0,
++ clientpid => 0,
+ reneg => 0,
+
+ #Public read
+@@ -104,6 +105,7 @@ sub clearClient
+ $self->{record_list} = [];
+ $self->{message_list} = [];
+ $self->{clientflags} = "";
++ $self->{clientpid} = 0;
+
+ TLSProxy::Message->clear();
+ TLSProxy::Record->clear();
+@@ -225,6 +227,7 @@ sub clientstart
+ }
+ exec($execcmd);
+ }
++ $self->clientpid($pid);
+ }
+
+ # Wait for incoming connection from client
+@@ -315,6 +318,10 @@ sub clientstart
+ waitpid( $self->serverpid, 0);
+ die "exit code $? from server process\n" if $? != 0;
+ }
++ die "clientpid is zero\n" if $self->clientpid == 0;
++ print "Waiting for client process to close: ".$self->clientpid."\n";
++ waitpid($self->clientpid, 0);
++
+ return 1;
+ }
+
+@@ -508,6 +515,14 @@ sub serverpid
+ }
+ return $self->{serverpid};
+ }
++sub clientpid
++{
++ my $self = shift;
++ if (@_) {
++ $self->{clientpid} = shift;
++ }
++ return $self->{clientpid};
++}
+
+ sub fill_known_data
+ {
+--
+2.13.2
+
Modified: openssl/branches/1.1.0/debian/patches/series
===================================================================
--- openssl/branches/1.1.0/debian/patches/series 2017-08-06 21:40:47 UTC (rev 909)
+++ openssl/branches/1.1.0/debian/patches/series 2017-08-06 21:55:55 UTC (rev 910)
@@ -5,3 +5,4 @@
c_rehash-compat.patch
#padlock_conf.patch
0001-Only-release-thread-local-key-if-we-created-it.patch
+Fix-a-Proxy-race-condition.patch
More information about the Pkg-openssl-changes
mailing list