libcrypt-openssl-bignum-perl: add recipe
PATCH 1/7 libcrypt-openssl-bignum-perl: add recipe
Crypt::OpenSSL::Bignum provides access to OpenSSL's multiprecision integer arithmetic. Crypt::OpenSSL::RSA 0.41 loads it unconditionally ("use Crypt::OpenSSL::Bignum" in RSA.pm), so RSA cannot be used at all without it.
The module has no t/ directory (only a top-level test.pl), so no ptest.
AI-Generated: Uses Claude Code
--- .../libcrypt-openssl-bignum-perl_0.09.bb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta-perl/recipes-perl/libcrypt/libcrypt-openssl-bignum-perl_0.09.bb
meta-perl/recipes-perl/libcrypt/libcrypt-openssl-bignum-perl_0.09.bb new file +26 -0
@@ -0,0 +1,26 @@ +SUMMARY = "Crypt::OpenSSL::Bignum - OpenSSL's multiprecision integer arithmetic" +DESCRIPTION = "Crypt::OpenSSL::Bignum provides access to OpenSSL multiprecision \ +integer arithmetic libraries. It is used by other OpenSSL modules, such as \ +Crypt::OpenSSL::RSA, to provide bignum values like key parameters." +HOMEPAGE = "https://metacpan.org/dist/Crypt-OpenSSL-Bignum" +SECTION = "libs" +LICENSE = "Artistic-1.0 OR GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=385c55653886acac3821999a3ccd17b3" + +SRC_URI = "${CPAN_MIRROR}/authors/id/K/KM/KMX/Crypt-OpenSSL-Bignum-${PV}.tar.gz" +SRC_URI[sha256sum] = "234e72fb8396d45527e6fd45e43759c5c3f3a208cf8f29e6a22161a996fd42dc" + +S = "${UNPACKDIR}/Crypt-OpenSSL-Bignum-${PV}" + +DEPENDS += "openssl" + +EXTRA_CPANFLAGS = "INC='-I${STAGING_INCDIR}' LIBS='-L${STAGING_LIBDIR} -L${STAGING_BASELIBDIR} -lcrypto'" + +inherit cpan + +RDEPENDS:${PN} += "\ + perl-module-carp \ + perl-module-dynaloader \ +" + +BBCLASSEXTEND = "native"
PATCH 2/7 libcrypt-urandom-perl: add recipe
Crypt::URandom provides non-blocking cryptographically secure random bytes via getrandom(2) or /dev/urandom. Authen::SASL 2.2000 uses it in its DIGEST-MD5 mechanism.
AI-Generated: Uses Claude Code
--- .../libcrypt/libcrypt-urandom-perl_0.55.bb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 meta-perl/recipes-perl/libcrypt/libcrypt-urandom-perl_0.55.bb
meta-perl/recipes-perl/libcrypt/libcrypt-urandom-perl_0.55.bb new file +34 -0
@@ -0,0 +1,34 @@ +SUMMARY = "Crypt::URandom - Provide non blocking randomness" +DESCRIPTION = "Crypt::URandom reads random bytes from the getrandom(2) system \ +call or /dev/urandom, providing cryptographically secure randomness that does \ +not block." +HOMEPAGE = "https://metacpan.org/dist/Crypt-URandom" +SECTION = "libs" +LICENSE = "Artistic-1.0 OR GPL-1.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ec17831373365f90a71812362a07229a" + +SRC_URI = "${CPAN_MIRROR}/authors/id/D/DD/DDICK/Crypt-URandom-${PV}.tar.gz" +SRC_URI[sha256sum] = "ef9f44141073c13573e85b148ff9a9089c45825b7d6608d832e4263899d3a2d4" + +S = "${UNPACKDIR}/Crypt-URandom-${PV}" + +inherit cpan ptest-perl + +RDEPENDS:${PN} += "\ + perl-module-carp \ + perl-module-constant \ + perl-module-english \ + perl-module-exporter \ + perl-module-filehandle \ + perl-module-xsloader \ +" + +RDEPENDS:${PN}-ptest += "\ + perl-module-config \ + perl-module-encode \ + perl-module-overload \ + perl-module-posix \ + perl-module-test-more \ +" + +BBCLASSEXTEND = "native"
PATCH 3/7 libcrypt-openssl-rsa-perl: add missing runtime dependencies
In reply to Khem RajCrypt::OpenSSL::RSA 0.41 does "use Crypt::OpenSSL::Bignum", which was not installed, so the module failed to load and every ptest failed:
Can't locate Crypt/OpenSSL/Bignum.pm in @INC
BEGIN failed--compilation aborted at .../Crypt/OpenSSL/RSA.pm line 7.
Add libcrypt-openssl-bignum-perl to RDEPENDS, and perl-module-mime-base64 for t/der.t.
meta-perl-image-ptest-libcrypt-openssl-rsa-perl on qemux86-64 now passes 16 tests with none failing (7 skipped).
AI-Generated: Uses Claude Code
--- .../recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.41.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.41.bb +2 -0
@@ -12,6 +12,7 @@ SRC_URI[sha256sum] = "82fa839897b88e9c245b6265f3be26d3bc879cae4c7a8151fad4a307c3 DEPENDS += "libcrypt-openssl-guess-perl-native openssl" RDEPENDS:${PN} = " \ + libcrypt-openssl-bignum-perl \ libcrypt-openssl-random-perl \ perl-module-autoloader \ perl-module-carp \
@@ -36,6 +37,7 @@ RDEPENDS:${PN}-ptest += " \ perl-module-test \ perl-module-test-more \ perl-module-lib \ + perl-module-mime-base64 \ libcrypt-openssl-guess-perl \ perl-module-english \ "
PATCH 4/7 libauthen-sasl-perl: add libcrypt-urandom-perl to RDEPENDS
In reply to Khem RajAuthen::SASL::Perl::DIGEST_MD5 uses Crypt::URandom, which was not installed, so the DIGEST-MD5 mechanism could not be loaded:
No SASL mechanism found: DIGEST-MD5
and five ptests failed (digest_md5, negotiations/digest_md5, server/digest_md5, digest_md5_verified and order).
meta-perl-image-ptest-libauthen-sasl-perl on qemux86-64 now passes 15 tests with none failing.
AI-Generated: Uses Claude Code
--- meta-perl/recipes-perl/libauthen/libauthen-sasl-perl_2.2000.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-perl/recipes-perl/libauthen/libauthen-sasl-perl_2.2000.bb +1 -1
@@ -9,7 +9,7 @@ LICENSE = "Artistic-1.0 OR GPL-1.0-or-later" LIC_FILES_CHKSUM = "file://lib/Authen/SASL/Perl.pm;beginline=1;endline=3;md5=17123315bbcda19f484c07227594a609" DEPENDS = "perl" -RDEPENDS:${PN} = "libdigest-hmac-perl" +RDEPENDS:${PN} = "libcrypt-urandom-perl libdigest-hmac-perl" SRC_URI = "${CPAN_MIRROR}/authors/id/E/EH/EHUELS/Authen-SASL-${PV}.tar.gz \ file://run-ptest \
PATCH 5/7 libmodule-build-tiny-perl: add perl-module-perlio-encoding to RDEPENDS
In reply to Khem RajBuild.PL writes MYMETA.json through CPAN::Meta, which opens it with an :encoding() layer. Without PerlIO::encoding installed this fails:
Unknown PerlIO layer "encoding" at .../CPAN/Meta.pm line 412. Error opening 'MYMETA.json' for writing: No such file or directory
and t/simple fails.
meta-perl-image-ptest-libmodule-build-tiny-perl on qemux86-64 now passes.
AI-Generated: Uses Claude Code
--- .../recipes-perl/libmodule/libmodule-build-tiny-perl_0.053.bb | 1 + 1 file changed, 1 insertion(+)
meta-perl/recipes-perl/libmodule/libmodule-build-tiny-perl_0.053.bb +1 -0
@@ -46,6 +46,7 @@ RDEPENDS:${PN} += " \ perl-module-metadata \ perl-module-parse-cpan-meta \ perl-module-perl-ostype \ + perl-module-perlio-encoding \ perl-module-pod-man \ perl-module-tap-harness-env \ perl-module-test-more \
PATCH 6/7 libdata-hexdump-perl: add perl-module-parent to RDEPENDS
In reply to Khem RajData::HexDump uses parent.pm, which was not installed, so the module failed to load and both ptests failed:
Can't locate parent.pm in @INC
meta-perl-image-ptest-libdata-hexdump-perl on qemux86-64 now passes.
AI-Generated: Uses Claude Code
--- meta-perl/recipes-perl/libdata/libdata-hexdump-perl_0.04.bb | 1 + 1 file changed, 1 insertion(+)
meta-perl/recipes-perl/libdata/libdata-hexdump-perl_0.04.bb +1 -0
@@ -14,6 +14,7 @@ LICENSE = "Artistic-1.0" LIC_FILES_CHKSUM = "file://lib/Data/HexDump.pm;beginline=277;endline=279;md5=bf1cd9373f8d1f85fe091ee069a480e9" DEPENDS = "perl" +RDEPENDS:${PN} += "perl-module-parent" SRC_URI = "${CPAN_MIRROR}/authors/id/N/NE/NEILB/Data-HexDump-${PV}.tar.gz \ file://run-ptest \
PATCH 7/7 libnet-ssleay-perl: fix client hello ptest with OpenSSL 4
In reply to Khem RajOpenSSL 4.0 removed support for SSLv2 ClientHello, so the canned SSLv2 ClientHello test no longer gets the expected alert:
not ok 38 - Client: Alert from canned SSLv2 ClientHello
FAIL: t/local/48_client_hello_callback
Backport the upstream test update for it.
meta-perl-image-ptest-libnet-ssleay-perl on qemux86-64 now passes 37 tests with none failing.
AI-Generated: Uses Claude Code
--- ...-removal-of-SSLv2-Client-Hello-suppo.patch | 62 +++++++++++++++++++ .../libnet/libnet-ssleay-perl_1.96.bb | 1 + 2 files changed, 63 insertions(+) create mode 100644 meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0004-Update-tests-for-removal-of-SSLv2-Client-Hello-suppo.patch
meta-perl/recipes-perl/libnet/libnet-ssleay-perl/0004-Update-tests-for-removal-of-SSLv2-Client-Hello-suppo.patch new file +62 -0
@@ -0,0 +1,62 @@ +From 1a5837fa489836f0dfc411d3a0c4d955ce8fab8c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20Josef=20=C5=A0pa=C4=8Dek?= <[email protected]> +Date: Tue, 14 Apr 2026 14:48:51 +0200 +Subject: [PATCH] Update tests for removal of SSLv2 Client Hello support in + OpenSSL 4.0.0 + +Upstream-Status: Backport [https://github.com/radiator-software/p5-net-ssleay/commit/1a5837fa489836f0dfc411d3a0c4d955ce8fab8c] +Signed-off-by: Khem Raj <[email protected]> +--- + t/local/48_client_hello_callback.t | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/t/local/48_client_hello_callback.t b/t/local/48_client_hello_callback.t +index d99122c8..110d769a 100644 +--- a/t/local/48_client_hello_callback.t ++++ b/t/local/48_client_hello_callback.t +@@ -5,13 +5,15 @@ use Test::Net::SSLeay qw( + can_fork data_file_path initialise_libssl new_ctx tcp_socket + ); + ++my $has_sslv2_hello; + BEGIN { + if (not defined &Net::SSLeay::CTX_set_client_hello_cb) { + plan skip_all => "No SSL_CTX_set_client_hello_cb()"; + } elsif (not can_fork()) { + plan skip_all => "fork() not supported on this system"; + } else { +- plan tests => 41; ++ $has_sslv2_hello = Net::SSLeay::SSLeay() < 0x40000000; ++ plan tests => $has_sslv2_hello ? 41 : 30; + } + } + +@@ -172,7 +174,7 @@ my @cb_tests = ( + # argument passed to the callback + # true if the callback function triggers croak() + # true if the client needs to test that ALPN alert (120) is received +- [ \&client_hello_cb_v2hello_detection, undef, 0 ], ++ ($has_sslv2_hello ? [ \&client_hello_cb_v2hello_detection, undef, 0 ] : ()), + [ \&client_hello_cb_getters, undef, 0 ], + [ \&client_hello_cb_value_passing, \$cb_test_arg, 0 ], + [ \&client_hello_cb_alert_alpn, undef, 0, 'alerts'], +@@ -248,8 +250,8 @@ my @results; + }; + + # Start with SSLv2 ClientHello detection test. Send a canned SSLv2 +- # ClientHello. +- { ++ # ClientHello. Removed in OpenSSL 4.0.0. ++ if ($has_sslv2_hello) { + my $s_clientv2 = $server->connect(); + my $clientv2_hello = get_sslv2_hello(); + syswrite($s_clientv2, $clientv2_hello, length $clientv2_hello); +@@ -306,7 +308,7 @@ my @results; + waitpid $pid, 0; + push @results, [$? == 0, 'Client: server exited with 0']; + END { +- Test::More->builder->current_test(37); ++ Test::More->builder->current_test($has_sslv2_hello ? 37 : 27); + ok( $_->[0], $_->[1] ) for (@results); + } +
meta-perl/recipes-perl/libnet/libnet-ssleay-perl_1.96.bb +1 -0
@@ -28,6 +28,7 @@ SRC_URI = "${CPAN_MIRROR}/authors/id/C/CH/CHRISN/Net-SSLeay-${PV}.tar.gz \ file://0001-Fix-SSLv3-in-OpenSSL-4.0.0.patch \ file://0002-OpenSSL-4.0.0-remove-support-for-some-TLS-functions.patch \ file://0003-Fix-Net-SSLeay-to-support-opaque-ASN1_STRING.patch \ + file://0004-Update-tests-for-removal-of-SSLv2-Client-Hello-suppo.patch \ " SRC_URI[sha256sum] = "ab213691685fb2a576c669cbc8d9266f8165a31563ad15b7c4030b94adfc0753"