File perl-Convert-PEM.spec of Package perl-Convert-PEM
#
# spec file for package perl-Convert-PEM
#
# Copyright (c) 2024 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 Convert-PEM
Name: perl-Convert-PEM
Version: 0.130.0
Release: 0
# 0.13 -> normalize -> 0.130.0
%define cpan_version 0.13
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Read/write encrypted ASN.1 PEM files
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/T/TI/TIMLEGGE/%{cpan_name}-%{cpan_version}.tar.gz
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Class::ErrorHandler)
BuildRequires: perl(Convert::ASN1) >= 0.340
BuildRequires: perl(Crypt::DES_EDE3)
BuildRequires: perl(Crypt::PRNG)
BuildRequires: perl(Test::Exception)
Requires: perl(Class::ErrorHandler)
Requires: perl(Convert::ASN1) >= 0.340
Requires: perl(Crypt::DES_EDE3)
Requires: perl(Crypt::PRNG)
Provides: perl(Convert::PEM) = %{version}
Provides: perl(Convert::PEM::CBC) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
_Convert::PEM_ reads and writes PEM files containing ASN.1-encoded objects.
The files can optionally be encrypted using a symmetric cipher algorithm,
such as 3DES. An unencrypted PEM file might look something like this:
-----BEGIN DH PARAMETERS-----
MB4CGQDUoLoCULb9LsYm5+/WN992xxbiLQlEuIsCAQM=
-----END DH PARAMETERS-----
The string beginning 'MB4C...' is the Base64-encoded, ASN.1-encoded
"object."
An encrypted file would have headers describing the type of encryption
used, and the initialization vector:
-----BEGIN DH PARAMETERS-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,C814158661DC1449
AFAZFbnQNrGjZJ/ZemdVSoZa3HWujxZuvBHzHNoesxeyqqidFvnydA==
-----END DH PARAMETERS-----
The two headers ('Proc-Type' and 'DEK-Info') indicate information about the
type of encryption used, and the string starting with 'AFAZ...' is the
Base64-encoded, encrypted, ASN.1-encoded contents of this "object."
The initialization vector ('C814158661DC1449') is chosen randomly.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README
%license LICENSE
%changelog