aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2024-08-01 11:09:53 -0700
committerorbea <orbea@riseup.net>2024-08-01 11:09:53 -0700
commit4d88bd03d8589c6ad3b78ecec0087af4bd16792b (patch)
tree5b85077c45a26790f3df8ff1581619f13d9496f3 /dev-perl/Net-SSLeay
parentapp-text/mupdf: drop 1.22.0-r1, 1.23.3-r1 (diff)
downloadlibressl-4d88bd03d8589c6ad3b78ecec0087af4bd16792b.tar.gz
libressl-4d88bd03d8589c6ad3b78ecec0087af4bd16792b.tar.bz2
libressl-4d88bd03d8589c6ad3b78ecec0087af4bd16792b.zip
dev-perl/Net-SSLeay: sync ::gentoo
Signed-off-by: orbea <orbea@riseup.net>
Diffstat (limited to 'dev-perl/Net-SSLeay')
-rw-r--r--dev-perl/Net-SSLeay/Net-SSLeay-1.940.0.ebuild1
-rw-r--r--dev-perl/Net-SSLeay/files/Net-SSLeay-1.90-libressl.patch150
-rw-r--r--dev-perl/Net-SSLeay/files/Net-SSLeay-1.940.0-avoid-runtime-check.patch26
3 files changed, 27 insertions, 150 deletions
diff --git a/dev-perl/Net-SSLeay/Net-SSLeay-1.940.0.ebuild b/dev-perl/Net-SSLeay/Net-SSLeay-1.940.0.ebuild
index d3214f5..c11bb15 100644
--- a/dev-perl/Net-SSLeay/Net-SSLeay-1.940.0.ebuild
+++ b/dev-perl/Net-SSLeay/Net-SSLeay-1.940.0.ebuild
@@ -36,6 +36,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${PN}-1.88-fix-network-tests.patch"
+ "${FILESDIR}/${PN}-1.940.0-avoid-runtime-check.patch"
"${FILESDIR}/${PN}-1.94-libressl.patch" #903001
)
diff --git a/dev-perl/Net-SSLeay/files/Net-SSLeay-1.90-libressl.patch b/dev-perl/Net-SSLeay/files/Net-SSLeay-1.90-libressl.patch
deleted file mode 100644
index 5a253bc..0000000
--- a/dev-perl/Net-SSLeay/files/Net-SSLeay-1.90-libressl.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-https://github.com/radiator-software/p5-net-ssleay/pull/285
-https://github.com/radiator-software/p5-net-ssleay/commit/b5143eaec1a59ee948e8d2bace246bbb2440f397
-https://github.com/radiator-software/p5-net-ssleay/pull/360
-https://github.com/radiator-software/p5-net-ssleay/commit/4a886e06c1cac80e7fb3f8d52146a27ce557ba8c
-https://github.com/radiator-software/p5-net-ssleay/pull/362
-https://github.com/radiator-software/p5-net-ssleay/commit/88c3bbc45399c8ef2c8879aada8bfa91d8bc6c10
-https://github.com/radiator-software/p5-net-ssleay/pull/363
-https://github.com/radiator-software/p5-net-ssleay/commit/3dd2f101b8e15a59f66e22525b8d001d5ad6ce7d
-
-From b5143eaec1a59ee948e8d2bace246bbb2440f397 Mon Sep 17 00:00:00 2001
-From: Alexander Bluhm <alexander.bluhm@gmx.net>
-Date: Wed, 1 Sep 2021 13:06:04 +0200
-Subject: [PATCH] Use SSL_SESSION_get_master_key() for LibreSSL. (#285)
-
-Since version 2.7 LibreSSL implements SSL_SESSION_get_master_key().
-Use this instead of accessing internal struct fields.
----
- SSLeay.xs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-From 4a886e06c1cac80e7fb3f8d52146a27ce557ba8c Mon Sep 17 00:00:00 2001
-From: Alexander Bluhm <alexander.bluhm@gmx.net>
-Date: Wed, 19 Jan 2022 14:56:22 +0100
-Subject: [PATCH] Use X509_get0_tbs_sigalg() for LibreSSL. (#360)
-
-* Use X509_get0_tbs_sigalg() for LibreSSL.
-
-LibreSSL 3.5.0 has removed access to internal data structures. Use
-X509_get0_tbs_sigalg() like in OpenSSL 1.1.
-
-* Start Changes for the next release.
-
-Co-authored-by: Heikki Vatiainen <hvn@radiatorsoftware.com>
----
- Changes | 5 +++++
- SSLeay.xs | 2 +-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-From 88c3bbc45399c8ef2c8879aada8bfa91d8bc6c10 Mon Sep 17 00:00:00 2001
-From: Alexander Bluhm <alexander.bluhm@gmx.net>
-Date: Wed, 19 Jan 2022 20:38:57 +0100
-Subject: [PATCH] Use OCSP_SINGLERESP_get0_id() for LibreSSL. (#362)
-
-LibreSSL 3.5.0 has removed access to internal ocsp data structures.
-Use OCSP_SINGLERESP_get0_id() like in OpenSSL 1.1.
----
- SSLeay.xs | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-From 3dd2f101b8e15a59f66e22525b8d001d5ad6ce7d Mon Sep 17 00:00:00 2001
-From: Alexander Bluhm <alexander.bluhm@gmx.net>
-Date: Thu, 20 Jan 2022 19:15:27 +0100
-Subject: [PATCH] Implement RSA_get_key_parameters() for newer LibreSSL. (#363)
-
-LibreSSL 3.5.0 has removed access to internal rsa data structures.
-Use RSA_get0... functions to provide RSA_get_key_parameters().
----
- SSLeay.xs | 25 +++++++++++++++++++++++--
- 1 file changed, 23 insertions(+), 2 deletions(-)
-
-diff --git a/SSLeay.xs b/SSLeay.xs
-index 02b81e7..bffd72d 100644
---- a/SSLeay.xs
-+++ b/SSLeay.xs
-@@ -1759,7 +1759,7 @@ X509 * find_issuer(X509 *cert,X509_STORE *store, STACK_OF(X509) *chain) {
- return issuer;
- }
-
--SV* bn2sv(BIGNUM* p_bn)
-+SV* bn2sv(const BIGNUM* p_bn)
- {
- return p_bn != NULL
- ? sv_2mortal(newSViv((IV) BN_dup(p_bn)))
-@@ -6006,8 +6006,28 @@ RSA_generate_key(bits,e,perl_cb=&PL_sv_undef,perl_data=&PL_sv_undef)
- void
- RSA_get_key_parameters(rsa)
- RSA * rsa
-+PREINIT:
-+#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
-+ const BIGNUM *n, *e, *d;
-+ const BIGNUM *p, *q;
-+ const BIGNUM *dmp1, *dmq1, *iqmp;
-+#endif
- PPCODE:
- {
-+#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
-+ RSA_get0_key(rsa, &n, &e, &d);
-+ RSA_get0_factors(rsa, &p, &q);
-+ RSA_get0_crt_params(rsa, &dmp1, &dmq1, &iqmp);
-+ /* Caution: returned list consists of SV pointers to BIGNUMs, which would need to be blessed as Crypt::OpenSSL::Bignum for further use */
-+ XPUSHs(bn2sv(n));
-+ XPUSHs(bn2sv(e));
-+ XPUSHs(bn2sv(d));
-+ XPUSHs(bn2sv(p));
-+ XPUSHs(bn2sv(q));
-+ XPUSHs(bn2sv(dmp1));
-+ XPUSHs(bn2sv(dmq1));
-+ XPUSHs(bn2sv(iqmp));
-+#else
- /* Caution: returned list consists of SV pointers to BIGNUMs, which would need to be blessed as Crypt::OpenSSL::Bignum for further use */
- XPUSHs(bn2sv(rsa->n));
- XPUSHs(bn2sv(rsa->e));
-@@ -6017,9 +6037,10 @@ PPCODE:
- XPUSHs(bn2sv(rsa->dmp1));
- XPUSHs(bn2sv(rsa->dmq1));
- XPUSHs(bn2sv(rsa->iqmp));
-+#endif
- }
-
--#endif
-+#endif /* OpenSSL < 1.1 or LibreSSL */
-
- void
- RSA_free(r)
-@@ -6172,7 +6193,7 @@ SSL_total_renegotiations(ssl)
- OUTPUT:
- RETVAL
-
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
-+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) || (LIBRESSL_VERSION_NUMBER >= 0x2070000fL)
- void
- SSL_SESSION_get_master_key(s)
- SSL_SESSION * s
-@@ -6920,7 +6941,7 @@ ASN1_OBJECT *
- P_X509_get_signature_alg(x)
- X509 * x
- CODE:
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
-+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
- RETVAL = (X509_get0_tbs_sigalg(x)->algorithm);
- #else
- RETVAL = (x->cert_info->signature->algorithm);
-@@ -7412,7 +7433,7 @@ OCSP_response_results(rsp,...)
- if (!idsv) {
- /* getall: create new SV with OCSP_CERTID */
- unsigned char *pi,*pc;
--#if OPENSSL_VERSION_NUMBER >= 0x10100003L && !defined(LIBRESSL_VERSION_NUMBER)
-+#if (OPENSSL_VERSION_NUMBER >= 0x10100003L && !defined(LIBRESSL_VERSION_NUMBER)) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
- int len = i2d_OCSP_CERTID(OCSP_SINGLERESP_get0_id(sir),NULL);
- #else
- int len = i2d_OCSP_CERTID(sir->certId,NULL);
-@@ -7421,7 +7442,7 @@ OCSP_response_results(rsp,...)
- Newx(pc,len,unsigned char);
- if (!pc) croak("out of memory");
- pi = pc;
--#if OPENSSL_VERSION_NUMBER >= 0x10100003L && !defined(LIBRESSL_VERSION_NUMBER)
-+#if (OPENSSL_VERSION_NUMBER >= 0x10100003L && !defined(LIBRESSL_VERSION_NUMBER)) || (LIBRESSL_VERSION_NUMBER >= 0x3050000fL)
- i2d_OCSP_CERTID(OCSP_SINGLERESP_get0_id(sir),&pi);
- #else
- i2d_OCSP_CERTID(sir->certId,&pi);
diff --git a/dev-perl/Net-SSLeay/files/Net-SSLeay-1.940.0-avoid-runtime-check.patch b/dev-perl/Net-SSLeay/files/Net-SSLeay-1.940.0-avoid-runtime-check.patch
new file mode 100644
index 0000000..ed60190
--- /dev/null
+++ b/dev-perl/Net-SSLeay/files/Net-SSLeay-1.940.0-avoid-runtime-check.patch
@@ -0,0 +1,26 @@
+From 5219e8c5181b3a819b89032766340d5c1b11c3c5 Mon Sep 17 00:00:00 2001
+From: Luca Barbato <lu_zero@gentoo.org>
+Date: Sat, 29 Jun 2024 21:10:06 +0200
+Subject: [PATCH] Remove the runtime check
+
+Makes simpler to cross-build. At least for Gentoo it is fine since we
+control the versions on our own.
+---
+ Makefile.PL | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 94c72f2..d4b1aea 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -196,7 +196,6 @@ EOM
+ exit MISSING_PREREQ;
+ }
+
+- check_openssl_version($prefix, $exec);
+ my %args = (
+ CCCDLFLAGS => $opts->{cccdlflags},
+ OPTIMIZE => $opts->{optimize},
+--
+2.45.2
+