diff options
author | orbea <orbea@riseup.net> | 2022-11-15 08:20:08 -0800 |
---|---|---|
committer | Quentin Retornaz <gentoo@retornaz.com> | 2022-11-15 22:18:01 +0100 |
commit | 628ecd5fe23aa3718cd9671da38c83391a312cb2 (patch) | |
tree | 27ef77234a6f58d87e96410ceb4dc2370d4bc12a /dev-perl/Net-SSLeay | |
parent | dev-lang/python: Merge ::gentoo changes (diff) | |
download | libressl-628ecd5fe23aa3718cd9671da38c83391a312cb2.tar.gz libressl-628ecd5fe23aa3718cd9671da38c83391a312cb2.tar.bz2 libressl-628ecd5fe23aa3718cd9671da38c83391a312cb2.zip |
dev-perl/Net-SSLeay: Add 1.920.0
Signed-off-by: orbea <orbea@riseup.net>
Signed-off-by: Quentin Retornaz <gentoo@retornaz.com>
Diffstat (limited to 'dev-perl/Net-SSLeay')
-rw-r--r-- | dev-perl/Net-SSLeay/Manifest | 1 | ||||
-rw-r--r-- | dev-perl/Net-SSLeay/Net-SSLeay-1.920.0.ebuild | 66 | ||||
-rw-r--r-- | dev-perl/Net-SSLeay/files/Net-SSLeay-1.920.0-libressl.patch | 87 | ||||
-rw-r--r-- | dev-perl/Net-SSLeay/metadata.xml | 13 |
4 files changed, 167 insertions, 0 deletions
diff --git a/dev-perl/Net-SSLeay/Manifest b/dev-perl/Net-SSLeay/Manifest index 5937ab9..5859dc2 100644 --- a/dev-perl/Net-SSLeay/Manifest +++ b/dev-perl/Net-SSLeay/Manifest @@ -1 +1,2 @@ DIST Net-SSLeay-1.90.tar.gz 534246 BLAKE2B 2510fa886db8b7c5f185aa1145ae1b50b7c4101a9bd80e17c8c1d77718765f288c9180464d831775c35aa94b5a6f6c8f717ecaeb4974f7280829b63f10567f22 SHA512 8a5f251b5ef1d8c2d619d984594a7a22ddeed2e5e726fe683a45f299d7878f4ca8ffab00480ebf5ef7a94ae1fcf6be05dfdaa68b8bfe2ad68443150765adb891 +DIST Net-SSLeay-1.92.tar.gz 555930 BLAKE2B 04d97860817b013a9680e0ef29b0004ddb98da2db859761a45612c4d25b6edd16bf92645293d1108d83352bce18665721c6df05455426b32a95a42b464119a3d SHA512 e9d9161ebeb7be90f4c7a0ea98f1034892ce6d33aa72872683177b19daa1f4c5819f85ea9a052a076ec8d7c21705f6c344aef64680bc881bf3218d38e8b7b173 diff --git a/dev-perl/Net-SSLeay/Net-SSLeay-1.920.0.ebuild b/dev-perl/Net-SSLeay/Net-SSLeay-1.920.0.ebuild new file mode 100644 index 0000000..14597a8 --- /dev/null +++ b/dev-perl/Net-SSLeay/Net-SSLeay-1.920.0.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DIST_AUTHOR=CHRISN +DIST_VERSION=1.92 +DIST_EXAMPLES=("examples/*") +inherit perl-module + +DESCRIPTION="Perl extension for using OpenSSL" + +LICENSE="Artistic-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="minimal examples" + +RDEPEND=" + dev-libs/openssl:= + virtual/perl-MIME-Base64 +" +DEPEND="${RDEPEND}" +BDEPEND="${RDEPEND} + virtual/perl-ExtUtils-MakeMaker + virtual/perl-File-Spec + test? ( + !minimal? ( + dev-perl/Test-Exception + dev-perl/Test-Warn + dev-perl/Test-NoWarnings + ) + virtual/perl-Test-Simple + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.88-fix-network-tests.patch" + "${FILESDIR}/${PN}-1.920.0-libressl.patch" +) + +PERL_RM_FILES=( + # Hateful author tests + 't/local/01_pod.t' + 't/local/02_pod_coverage.t' + 't/local/kwalitee.t' +) + +src_configure() { + if use test && has network ${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}}; then + export NETWORK_TESTS=yes + else + use test && einfo "Network tests will be skipped without DIST_TEST_OVERRIDE=~network" + export NETWORK_TESTS=no + fi + export LIBDIR=$(get_libdir) + use prefix && export OPENSSL_PREFIX="${EPREFIX}/usr" + perl-module_src_configure +} + +src_compile() { + mymake=( + OPTIMIZE="${CFLAGS}" + OPENSSL_PREFIX="${EPREFIX}"/usr + ) + perl-module_src_compile +} diff --git a/dev-perl/Net-SSLeay/files/Net-SSLeay-1.920.0-libressl.patch b/dev-perl/Net-SSLeay/files/Net-SSLeay-1.920.0-libressl.patch new file mode 100644 index 0000000..eb1c331 --- /dev/null +++ b/dev-perl/Net-SSLeay/files/Net-SSLeay-1.920.0-libressl.patch @@ -0,0 +1,87 @@ +https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/security/p5-Net-SSLeay/patches/patch-SSLeay_xs + +https://github.com/radiator-software/p5-net-ssleay/commit/3dd2f101b8e15a59f66e22525b8d001d5ad6ce7d +https://github.com/radiator-software/p5-net-ssleay/commit/4a886e06c1cac80e7fb3f8d52146a27ce557ba8c +https://github.com/radiator-software/p5-net-ssleay/commit/88c3bbc45399c8ef2c8879aada8bfa91d8bc6c10 + +Index: SSLeay.xs +--- a/SSLeay.xs.orig ++++ b/SSLeay.xs +@@ -1914,7 +1914,7 @@ X509 * find_issuer(X509 *cert,X509_STORE *store, STACK + 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))) +@@ -6283,9 +6283,29 @@ RSA_generate_key(bits,e,perl_cb=&PL_sv_undef,perl_data + 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)); + XPUSHs(bn2sv(rsa->d)); +@@ -6294,9 +6314,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) +@@ -7197,7 +7218,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); +@@ -7690,7 +7711,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_CERTID *)OCSP_SINGLERESP_get0_id(sir),NULL); + #else + int len = i2d_OCSP_CERTID(sir->certId,NULL); +@@ -7699,7 +7720,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_CERTID *)OCSP_SINGLERESP_get0_id(sir),&pi); + #else + i2d_OCSP_CERTID(sir->certId,&pi); diff --git a/dev-perl/Net-SSLeay/metadata.xml b/dev-perl/Net-SSLeay/metadata.xml new file mode 100644 index 0000000..963e912 --- /dev/null +++ b/dev-perl/Net-SSLeay/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>perl@gentoo.org</email> + <name>Gentoo Perl Project</name> + </maintainer> + <upstream> + <remote-id type="cpan">Net-SSLeay</remote-id> + <remote-id type="cpan-module">Net::SSLeay</remote-id> + <remote-id type="cpan-module">Net::SSLeay::Handle</remote-id> + </upstream> +</pkgmetadata> |