Sync from SUSE:SLFO:Main perl-Net-SSLeay revision 3168a273bb878cbaa2776c693d32e4f5
This commit is contained in:
commit
955d3c8d48
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
BIN
Net-SSLeay-1.92.tar.gz
(Stored with Git LFS)
Normal file
BIN
Net-SSLeay-1.92.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,72 @@
|
||||
From 87e8d288e4ab42e0b9e934850195a3498e4de4be Mon Sep 17 00:00:00 2001
|
||||
From: Heikki Vatiainen <hvn@radiatorsoftware.com>
|
||||
Date: Wed, 6 Dec 2023 23:19:45 +0200
|
||||
Subject: [PATCH] GH-449 Use constants X509_VERSION_3 and X509_REQ_VERSION_1
|
||||
when available.
|
||||
|
||||
OpenSSL 3.2.0 no longer allows setting certificate version field value to 3
|
||||
because the highest current value is 2. The confusion likely arises from the
|
||||
definition of version field values in ASN.1 definitions where value 2 means
|
||||
version 3, value 1 is version 2, and so forth for certificate request and CRLs.
|
||||
|
||||
Test 33_x509_create_cert.t was directly setting certificate version to integer
|
||||
3 which no longer worked. Using a valid value allows all tests to pass with
|
||||
OpenSSL 3.2.0.
|
||||
---
|
||||
t/local/33_x509_create_cert.t | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: Net-SSLeay-1.92/t/local/33_x509_create_cert.t
|
||||
===================================================================
|
||||
--- Net-SSLeay-1.92.orig/t/local/33_x509_create_cert.t
|
||||
+++ Net-SSLeay-1.92/t/local/33_x509_create_cert.t
|
||||
@@ -53,7 +53,8 @@ is(Net::SSLeay::X509_NAME_cmp($ca_issuer
|
||||
#set organizationName via add_entry_by_txt
|
||||
ok(Net::SSLeay::X509_NAME_add_entry_by_txt($name, "organizationName", MBSTRING_UTF8, "Company Name"), "X509_NAME_add_entry_by_txt");
|
||||
|
||||
- ok(Net::SSLeay::X509_set_version($x509, 3), "X509_set_version");
|
||||
+ my $x509_version_3 = (defined &Net::SSLeay::X509_VERSION_3) ? Net::SSLeay::X509_VERSION_3() : 2; # Note: X509_VERSION_3 is 2
|
||||
+ ok(Net::SSLeay::X509_set_version($x509, $x509_version_3), "X509_set_version");
|
||||
ok(my $sn = Net::SSLeay::X509_get_serialNumber($x509), "X509_get_serialNumber");
|
||||
|
||||
my $pubkey = Net::SSLeay::X509_get_X509_PUBKEY($x509);
|
||||
@@ -96,7 +97,7 @@ is(Net::SSLeay::X509_NAME_cmp($ca_issuer
|
||||
ok(my $sha1_digest = Net::SSLeay::EVP_get_digestbyname("sha1"), "EVP_get_digestbyname");
|
||||
ok(Net::SSLeay::X509_sign($x509, $ca_pk, $sha1_digest), "X509_sign");
|
||||
|
||||
- is(Net::SSLeay::X509_get_version($x509), 3, "X509_get_version");
|
||||
+ is(Net::SSLeay::X509_get_version($x509), $x509_version_3, "X509_get_version");
|
||||
is(Net::SSLeay::X509_verify($x509, Net::SSLeay::X509_get_pubkey($ca_cert)), 1, "X509_verify");
|
||||
|
||||
like(my $crt_pem = Net::SSLeay::PEM_get_string_X509($x509), qr/-----BEGIN CERTIFICATE-----/, "PEM_get_string_X509");
|
||||
@@ -183,8 +184,9 @@ is(Net::SSLeay::X509_NAME_cmp($ca_issuer
|
||||
ok(Net::SSLeay::X509_REQ_add1_attr_by_NID($req, 54, MBSTRING_ASC, 'password xyz'), "X509_REQ_add1_attr_by_NID");
|
||||
#49 = NID_pkcs9_unstructuredName - XXX-TODO add new constant
|
||||
ok(Net::SSLeay::X509_REQ_add1_attr_by_NID($req, 49, MBSTRING_ASC, 'Any Uns.name'), "X509_REQ_add1_attr_by_NID");
|
||||
-
|
||||
- ok(Net::SSLeay::X509_REQ_set_version($req, 2), "X509_REQ_set_version");
|
||||
+
|
||||
+ my $x509_req_version_1 = (defined &Net::SSLeay::X509_REQ_VERSION_1) ? Net::SSLeay::X509_REQ_VERSION_1() : 0; # Note: X509_REQ_VERSION_1 is 0
|
||||
+ ok(Net::SSLeay::X509_REQ_set_version($req, $x509_req_version_1), "X509_REQ_set_version");
|
||||
|
||||
ok(my $sha1_digest = Net::SSLeay::EVP_get_digestbyname("sha1"), "EVP_get_digestbyname");
|
||||
ok(Net::SSLeay::X509_REQ_sign($req, $pk, $sha1_digest), "X509_REQ_sign");
|
||||
@@ -192,7 +194,7 @@ is(Net::SSLeay::X509_NAME_cmp($ca_issuer
|
||||
ok(my $req_pubkey = Net::SSLeay::X509_REQ_get_pubkey($req), "X509_REQ_get_pubkey");
|
||||
is(Net::SSLeay::X509_REQ_verify($req, $req_pubkey), 1, "X509_REQ_verify");
|
||||
|
||||
- is(Net::SSLeay::X509_REQ_get_version($req), 2, "X509_REQ_get_version");
|
||||
+ is(Net::SSLeay::X509_REQ_get_version($req), $x509_req_version_1, "X509_REQ_get_version");
|
||||
ok(my $obj_challengePassword = Net::SSLeay::OBJ_txt2obj('1.2.840.113549.1.9.7'), "OBJ_txt2obj");
|
||||
ok(my $nid_challengePassword = Net::SSLeay::OBJ_obj2nid($obj_challengePassword), "OBJ_obj2nid");
|
||||
is(Net::SSLeay::X509_REQ_get_attr_count($req), 3, "X509_REQ_get_attr_count");
|
||||
@@ -214,7 +216,8 @@ is(Net::SSLeay::X509_NAME_cmp($ca_issuer
|
||||
|
||||
## PHASE2 - turn X509_REQ into X509 cert + sign with CA key
|
||||
ok(my $x509ss = Net::SSLeay::X509_new(), "X509_new");
|
||||
- ok(Net::SSLeay::X509_set_version($x509ss, 2), "X509_set_version");
|
||||
+ my $x509_version_3 = (defined &Net::SSLeay::X509_VERSION_3) ? Net::SSLeay::X509_VERSION_3() : 2; # Note: X509_VERSION_3 is 2
|
||||
+ ok(Net::SSLeay::X509_set_version($x509ss, $x509_version_3), "X509_set_version");
|
||||
ok(my $sn = Net::SSLeay::X509_get_serialNumber($x509ss), "X509_get_serialNumber");
|
||||
Net::SSLeay::P_ASN1_INTEGER_set_hex($sn, 'ABCDEF');
|
||||
Net::SSLeay::X509_set_issuer_name($x509ss, Net::SSLeay::X509_get_subject_name($ca_cert));
|
40
cpanspec.yml
Normal file
40
cpanspec.yml
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
#description_paragraphs: 3
|
||||
#description: |-
|
||||
# override description from CPAN
|
||||
#summary: override summary from CPAN
|
||||
#no_testing: broken upstream
|
||||
#sources:
|
||||
# - source1
|
||||
# - source2
|
||||
#patches:
|
||||
# foo.patch: -p1
|
||||
# bar.patch:
|
||||
# baz.patch: PATCH-FIX-OPENSUSE
|
||||
preamble: |-
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: perl(Test::Exception)
|
||||
BuildRequires: perl(Test::NoWarnings)
|
||||
BuildRequires: perl(Test::Pod) >= 1.41
|
||||
BuildRequires: perl(Test::Warn)
|
||||
#post_prep: |-
|
||||
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||
#post_build: |-
|
||||
# rm unused.files
|
||||
#post_install: |-
|
||||
# sed on %{name}.files
|
||||
#license: SUSE-NonFree
|
||||
#skip_noarch: 1
|
||||
#custom_build: |-
|
||||
#./Build build flags=%{?_smp_mflags} --myflag
|
||||
#custom_test: |-
|
||||
#startserver && make test
|
||||
#ignore_requires: Bizarre::Module
|
||||
#skip_doc: regexp_to_skip_for_doc.*
|
||||
#add_doc: files to add to docs
|
||||
#misc: |-
|
||||
#anything else to be added to spec file
|
||||
#follows directly after %files section, so it can contain new blocks or also
|
||||
#changes to %files section
|
1129
perl-Net-SSLeay.changes
Normal file
1129
perl-Net-SSLeay.changes
Normal file
File diff suppressed because it is too large
Load Diff
66
perl-Net-SSLeay.spec
Normal file
66
perl-Net-SSLeay.spec
Normal file
@ -0,0 +1,66 @@
|
||||
#
|
||||
# spec file for package perl-Net-SSLeay
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define cpan_name Net-SSLeay
|
||||
Name: perl-Net-SSLeay
|
||||
Version: 1.92
|
||||
Release: 0
|
||||
Summary: Perl bindings for OpenSSL and LibreSSL
|
||||
License: Artistic-2.0
|
||||
URL: https://metacpan.org/release/%{cpan_name}
|
||||
Source0: https://cpan.metacpan.org/authors/id/C/CH/CHRISN/%{cpan_name}-%{version}.tar.gz
|
||||
Source1: cpanspec.yml
|
||||
# PATCH-FIX-UPSTREAM https://github.com/radiator-software/p5-net-ssleay/issues/449
|
||||
Patch0: Use-constants-X509_VERSION_3-and-X509_REQ_VERSION_1-when-available.patch
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
%{perl_requires}
|
||||
# MANUAL BEGIN
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: perl(Test::Exception)
|
||||
BuildRequires: perl(Test::NoWarnings)
|
||||
BuildRequires: perl(Test::Pod) >= 1.41
|
||||
BuildRequires: perl(Test::Warn)
|
||||
# MANUAL END
|
||||
|
||||
%description
|
||||
This module provides Perl bindings for libssl (an SSL/TLS API) and
|
||||
libcrypto (a cryptography API).
|
||||
|
||||
%prep
|
||||
%autosetup -n %{cpan_name}-%{version} -p1
|
||||
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||
%make_build
|
||||
|
||||
%check
|
||||
make test
|
||||
|
||||
%install
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%files -f %{name}.files
|
||||
%doc Changes CONTRIBUTING.md Credits examples QuickRef README README.OSX README.VMS README.Win32
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user