commit: 85bae87afb4adf4db551c14949984e2ced1febe3
Author: Andreas K. Hüttel gentoo org>
AuthorDate: Thu Jan 5 10:06:09 2017 +
Commit: Andreas Hüttel gentoo org>
CommitDate: Thu Jan 5 10:06:09 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85bae87a
dev-perl/Crypt-OpenSSL-RSA: Add OpenSSL-1.1 compatibility patch from Debian,
bug 592534
Package-Manager: Portage-2.3.3, Repoman-2.3.1
.../Crypt-OpenSSL-RSA-0.280.0-r2.ebuild| 6 +-
.../Crypt-OpenSSL-RSA-0.280.0-openssl-1.1.0.patch | 256 +
2 files changed, 261 insertions(+), 1 deletion(-)
diff --git a/dev-perl/Crypt-OpenSSL-RSA/Crypt-OpenSSL-RSA-0.280.0-r2.ebuild
b/dev-perl/Crypt-OpenSSL-RSA/Crypt-OpenSSL-RSA-0.280.0-r2.ebuild
index a97e2de..9c0e9ef 100644
--- a/dev-perl/Crypt-OpenSSL-RSA/Crypt-OpenSSL-RSA-0.280.0-r2.ebuild
+++ b/dev-perl/Crypt-OpenSSL-RSA/Crypt-OpenSSL-RSA-0.280.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -21,6 +21,10 @@ RDEPEND="dev-perl/Crypt-OpenSSL-Bignum
"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}/${P}-openssl-1.1.0.patch"
+)
+
SRC_TEST="do"
mydoc="rfc*.txt"
diff --git
a/dev-perl/Crypt-OpenSSL-RSA/files/Crypt-OpenSSL-RSA-0.280.0-openssl-1.1.0.patch
b/dev-perl/Crypt-OpenSSL-RSA/files/Crypt-OpenSSL-RSA-0.280.0-openssl-1.1.0.patch
new file mode 100644
index ..22e742b
--- /dev/null
+++
b/dev-perl/Crypt-OpenSSL-RSA/files/Crypt-OpenSSL-RSA-0.280.0-openssl-1.1.0.patch
@@ -0,0 +1,256 @@
+From fdbda9585f5c99670912e5c0517dbc7a9d92c74b Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior
+Date: Sat, 1 Oct 2016 19:52:44 +
+Subject: [PATCH] libcrypt-openssl-rsa-perl: get it compiled with openssl 1.1.0
+
+Signed-off-by: Sebastian Andrzej Siewior
+
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=117481
+Bug-Debian: https://bugs.debian.org/828387
+
+---
+ RSA.xs | 173 -
+ 1 file changed, 150 insertions(+), 23 deletions(-)
+
+diff --git a/RSA.xs b/RSA.xs
+index de512e7822d0..b384cb0e23a2 100644
+--- a/RSA.xs
b/RSA.xs
+@@ -47,9 +47,119 @@ void croakSsl(char* p_file, int p_line)
+
+ #define THROW(p_result) if (!(p_result)) { error = 1; goto err; }
+
++#if OPENSSL_VERSION_NUMBER < 0x1010
++
++static void RSA_get0_key(const RSA *r,
++ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
++{
++if (n != NULL)
++*n = r->n;
++if (e != NULL)
++*e = r->e;
++if (d != NULL)
++*d = r->d;
++}
++
++static int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
++{
++/* If the fields n and e in r are NULL, the corresponding input
++ * parameters MUST be non-NULL for n and e. d may be
++ * left NULL (in case only the public key is used).
++ */
++if ((r->n == NULL && n == NULL)
++|| (r->e == NULL && e == NULL))
++return 0;
++
++if (n != NULL) {
++BN_free(r->n);
++r->n = n;
++}
++if (e != NULL) {
++BN_free(r->e);
++r->e = e;
++}
++if (d != NULL) {
++BN_free(r->d);
++r->d = d;
++}
++
++return 1;
++}
++
++static int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
++{
++/* If the fields p and q in r are NULL, the corresponding input
++ * parameters MUST be non-NULL.
++ */
++if ((r->p == NULL && p == NULL)
++|| (r->q == NULL && q == NULL))
++return 0;
++
++if (p != NULL) {
++BN_free(r->p);
++r->p = p;
++}
++if (q != NULL) {
++BN_free(r->q);
++r->q = q;
++}
++
++return 1;
++}
++
++static void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)
++{
++if (p != NULL)
++*p = r->p;
++if (q != NULL)
++*q = r->q;
++}
++
++static int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM
*iqmp)
++{
++/* If the fields dmp1, dmq1 and iqmp in r are NULL, the corresponding
input
++ * parameters MUST be non-NULL.
++ */
++if ((r->dmp1 == NULL && dmp1 == NULL)
++|| (r->dmq1 == NULL && dmq1 == NULL)
++|| (r->iqmp == NULL && iqmp == NULL))
++return 0;
++
++if (dmp1 != NULL) {
++BN_free(r->dmp1);
++r->dmp1 = dmp1;
++}
++if (dmq1 != NULL) {
++BN_free(r->dmq1);
++r->dmq1 = dmq1;
++}
++if (iqmp != NULL) {
++BN_free(r->iqmp);
++r->iqmp = iqmp;
++}
++
++return 1;
++}
++
++static void RSA_get0_crt_params(const RSA *r,
++const BIGNUM **dmp1, const BIGNUM **dmq1,
++const BIGNUM **iqmp)
++{
++if (dmp1 != NULL)
++*dmp1 = r->dmp1;
++if (dmq1 != NULL)
++*dmq1 = r->dmq1;
++if (iqmp != NULL)
++