Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/openssl/, dev-libs/openssl/files/
Date: Fri, 04 Oct 2019 15:48:31
Message-Id: 1570204094.584cf074dc8ef5f6aabf3130e5d590c5a331d7a8.whissi@gentoo
1 commit: 584cf074dc8ef5f6aabf3130e5d590c5a331d7a8
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 4 13:43:28 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 4 15:48:14 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=584cf074
7
8 dev-libs/openssl: fix USE=zlib
9
10 Closes: https://bugs.gentoo.org/696166
11 Package-Manager: Portage-2.3.76, Repoman-2.3.17
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 .../openssl/files/openssl-1.1.1d-fix-zlib.patch | 52 ++++++++++++++++++++++
15 ...nssl-1.1.1d.ebuild => openssl-1.1.1d-r1.ebuild} | 1 +
16 2 files changed, 53 insertions(+)
17
18 diff --git a/dev-libs/openssl/files/openssl-1.1.1d-fix-zlib.patch b/dev-libs/openssl/files/openssl-1.1.1d-fix-zlib.patch
19 new file mode 100644
20 index 00000000000..5d2f923a487
21 --- /dev/null
22 +++ b/dev-libs/openssl/files/openssl-1.1.1d-fix-zlib.patch
23 @@ -0,0 +1,52 @@
24 +From 86ed78676c660b553696cc10c682962522dfeb6c Mon Sep 17 00:00:00 2001
25 +From: Tomas Mraz <tmraz@×××××××××××××.org>
26 +Date: Thu, 12 Sep 2019 12:27:36 +0200
27 +Subject: [PATCH] BIO_f_zlib: Properly handle BIO_CTRL_PENDING and
28 + BIO_CTRL_WPENDING calls.
29 +
30 +There can be data to write in output buffer and data to read that were
31 +not yet read in the input stream.
32 +
33 +Fixes #9866
34 +
35 +Reviewed-by: Richard Levitte <levitte@×××××××.org>
36 +(Merged from https://github.com/openssl/openssl/pull/9877)
37 +
38 +(cherry picked from commit 6beb8b39ba8e4cb005c1fcd2586ba19e17f04b95)
39 +---
40 + crypto/comp/c_zlib.c | 22 ++++++++++++++++++++++
41 + 1 file changed, 22 insertions(+)
42 +
43 +diff --git a/crypto/comp/c_zlib.c b/crypto/comp/c_zlib.c
44 +index d688deee5f2..7c1be358fd7 100644
45 +--- a/crypto/comp/c_zlib.c
46 ++++ b/crypto/comp/c_zlib.c
47 +@@ -598,6 +598,28 @@ static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr)
48 + BIO_copy_next_retry(b);
49 + break;
50 +
51 ++ case BIO_CTRL_WPENDING:
52 ++ if (ctx->obuf == NULL)
53 ++ return 0;
54 ++
55 ++ if (ctx->odone) {
56 ++ ret = ctx->ocount;
57 ++ } else {
58 ++ ret = ctx->ocount;
59 ++ if (ret == 0)
60 ++ /* Unknown amount pending but we are not finished */
61 ++ ret = 1;
62 ++ }
63 ++ if (ret == 0)
64 ++ ret = BIO_ctrl(next, cmd, num, ptr);
65 ++ break;
66 ++
67 ++ case BIO_CTRL_PENDING:
68 ++ ret = ctx->zin.avail_in;
69 ++ if (ret == 0)
70 ++ ret = BIO_ctrl(next, cmd, num, ptr);
71 ++ break;
72 ++
73 + default:
74 + ret = BIO_ctrl(next, cmd, num, ptr);
75 + break;
76
77 diff --git a/dev-libs/openssl/openssl-1.1.1d.ebuild b/dev-libs/openssl/openssl-1.1.1d-r1.ebuild
78 similarity index 99%
79 rename from dev-libs/openssl/openssl-1.1.1d.ebuild
80 rename to dev-libs/openssl/openssl-1.1.1d-r1.ebuild
81 index dfb4be45e23..b9fd0c73a62 100644
82 --- a/dev-libs/openssl/openssl-1.1.1d.ebuild
83 +++ b/dev-libs/openssl/openssl-1.1.1d-r1.ebuild
84 @@ -45,6 +45,7 @@ PDEPEND="app-misc/ca-certificates"
85
86 PATCHES=(
87 "${FILESDIR}"/${PN}-1.1.0j-parallel_install_fix.patch #671602
88 + "${FILESDIR}"/${P}-fix-zlib.patch
89 )
90
91 S="${WORKDIR}/${MY_P}"