# # spec file for package perl-Mail-DKIM # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # 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/ # Name: perl-Mail-DKIM Version: 0.54 Release: 1.5 %define cpan_name Mail-DKIM Summary: Signs/verifies Internet mail with DKIM/DomainKey signatures License: Artistic-1.0 OR GPL-1.0-or-later Group: Development/Libraries/Perl Url: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/M/MB/MBRADSHAW/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Crypt::OpenSSL::RSA) >= 0.24 BuildRequires: perl(Digest::SHA) BuildRequires: perl(Mail::Address) BuildRequires: perl(Net::DNS) BuildRequires: perl(Net::DNS::Resolver::Mock) BuildRequires: perl(Test::RequiresInternet) BuildRequires: perl(YAML::XS) Requires: perl(Crypt::OpenSSL::RSA) >= 0.24 Requires: perl(Digest::SHA) Requires: perl(Mail::Address) Requires: perl(Net::DNS) Requires: perl(Net::DNS::Resolver::Mock) Requires: perl(Test::RequiresInternet) Requires: perl(YAML::XS) %{perl_requires} %description This module implements the various components of the DKIM and DomainKeys message-signing and verifying standards for Internet mail. It currently tries to implement these specifications: * RFC4871, for DKIM * RFC4870, for DomainKeys * draft-ietf-dmarc-arc-protocol-06, for ARC The module uses an object-oriented interface. You use one of two different classes, depending on whether you are signing or verifying a message. To sign, use the Mail::DKIM::Signer class. To verify, use the Mail::DKIM::Verifier class. Simple, eh? Likewise for ARC, use the ARC modules Mail::DKIM::ARC::Signer and Mail::DKIM::ARC::Verifier If you're sending to test libraries which expect the tags in headers to be sorted, you can set $Mail::DKIM::SORTTAGS to a true value, and all created headers will get sorted keys %prep %setup -q -n %{cpan_name}-%{version} find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc ChangeLog Changes doc HACKING.DKIM README.md TODO %changelog * Wed Apr 3 2019 Stephan Kulow - updated to 0.54 see /usr/share/doc/packages/perl-Mail-DKIM/ChangeLog - - VERSION 0.54 -- 2018-10-12: Marc Bradshaw * The T tag on arcseal is not required - - VERSION 0.53 -- 2018-05-27: Marc Bradshaw * Make tests less dependent on local resolver setup * Add thanks to Valimail - - VERSION 0.52 -- 2018-01-12: Marc Bradshaw * Internet connection tests were declared in the wrong order - - VERSION 0.51 -- 2018-01-12: Marc Bradshaw * Fix for older versions of perl * Tests no longer fail with no internet connection - - VERSION 0.50 -- 2017-12-16: Marc Bradshaw * Added Strict mode to DKIM verifier * Code formatting fixes 2017-12-14: John Levine * Make ARC code work a lot better * Add new arcsign.pl and arcverify.pl scripts - - VERSION 0.44 -- 2017-10-19: Marc Bradshaw * Added experimental support for ARC - - VERSION 0.43 -- 2017-09-20: Marc Bradshaw * Update tests for new DNS setup - - VERSION 0.42 -- 2017-07-29: Marc Bradshaw * Fix failing tests - - VERSION 0.41 -- 2017-04-14: Marc Bradshaw * commit aac893fdbaa7f8ccd5d37fa7f20d1785406cda51 Author: Marc Bradshaw Date: Fri Mar 17 14:53:53 2017 +1100 Avoid use of $_ in read loop RT 106485: Mail::DKIM::PrivateKey->load tampering $_ and * commit 06934f259e392b2a3cf94560e6051d9e522d0bf3 Author: Marc Bradshaw Date: Fri Mar 17 14:44:44 2017 +1100 Ensure PrivateKey file is closed properly. Store PrivateKey file handle in lexical variable and close it once we are done. RT 120638: Mail::DKIM::PrivateKey does not close FILE * commit 9e7c1c4cb78a6cb1cf396ece4379c7ed2c44c974 Author: Marc Bradshaw Date: Fri Feb 27 12:08:11 2015 +1100 Allow greater control over signed headers * commit 8291c034dc7db4394e9df80e70b8cbe8428a38c2 Author: Marc Bradshaw Date: Fri Jan 23 09:54:02 2015 +1100 Allow greater control over which headers are signed by Signer 2013-02-07: Jason Long * lib/Mail/DKIM/Verifier.pm (add_signature): call fetch_public_key() iff the signature passes a validity check; (finish_header): set result to 'invalid' if signature does not have a result * lib/Mail/DKIM/Signature.pm (check_protocol): now returns a list of supported protocols, or an empty list if no supported protocols found. 2013-02-06: Jason Long * t/corpus/good_83176.txt: add new email to test suite; this email contains a signature with a LIST of query methods, one of which is good, but the rest should be quietly ignored. This test currently fails. * lib/Mail/DKIM/Signature.pm (check_protocol): support multiple methods being specified in signatures q= tag. We look for dns/txt to occur anywhere in the field; all other values are ignored. - - VERSION 0.40 -- * Wed Mar 27 2013 stefan.jakobs@rus.uni-stuttgart.de - Update to version 0.40 - released 2013-02-07 * New/changed functionality: * a single DNS resolver is created for the lifetime of the program, rather than reinitializing the resolver for each new query. * bugfixes: * fix the error message given when an invalid algorithm is specified in the construction of Mail::DKIM::Signer. * avoid Perl warning about use of an undefined value in several places (rt.cpan.org issue #82913). * speed- improved performance of parsing the message into lines (rt.cpan.org issue #77902). Patch by Mark Martinec. * fix DNS queries to use the correct method (txtdata) of Net::DNS (rt.cpan.org issue #83170). Patch by Mark Martinec. * API changes: * global subroutines resolver() or enable_EDNS0() in module Mail::DKIM::DNS can be called to specify non-default options to Net::DNS::Resolver (see also rt.cpan.org issue #80425). * Fri Nov 18 2011 coolo@suse.com - use original .tar.gz * Mon Feb 21 2011 chris@computersalat.de - removed author * Mon Feb 21 2011 bjoern@cs.tu-berlin.de - added scripts to {_bindir} o dkimsign.pl o dkimverify.pl * Wed Dec 1 2010 coolo@novell.com - switch to perl_requires macro * Mon Nov 15 2010 varkoly@novell.com - update to 0.39 * change in API Mail::DKIM::Canonicalization::Base::finish_header * Bugfixes o Mail::DKIM::Signer: fix an unusual error message given when no Key argument has been specified and it is time to load the key o Mail::DKIM::Verifier: fix an issue with getting wrong error codes when q= tag is broken. * Mon Jul 26 2010 chris@computersalat.de - fix build for o:F (1140) o added bcond_with test if not set policy.t, public_key.t test are disabled * Wed Apr 7 2010 chris@computersalat.de - update to 0.38 * New/changed functionality: * DNS lookups can now be started asynchronously; the queries are created as the header is parsed; the results are not actually needed until the entire message has been read. (The Mail::DKIM module does not yet do the queries asynchrously; this is just the infrastructure so that the queries can be asynchronous in the future.) * bugfixes: * DNS lookup overrides alarm() signal (issue #2854325) * documentation updates: * document use of custom PrivateKey object, for external signing * describe how to get "pretty signatures" in Signer.pm - cleanup spec o added norootforbuild o sort TAGS o macros o fixed deps o enabled testsuite - disabled tests with DNS (policy.t, public_key.t) - added perl-macros * Sun Feb 28 2010 varkoly@novell.com - new version: 0.37 * New/changed functionality: * ADSP records now check whether the domain itself exists, in accordance to the ADSP specification * support for ADSP (author-domain-signing-practices) records * removed support for pre-standardized DKIM signatures (i.e. these are DKIM signatures without a v= or bh= tag). * DNS resolver errors are detected and reported as such * API changes: * restore the as_string() method which was accidentally removed in version 0.34 * renamed Mail::DKIM::Policy to Mail::DKIM::DkPolicy. Programs using the former name to create policy objects directly (though it would be more expected to fetch the objects through Mail::DKIM::Verifier) should update their code * new policies() method in Mail::DKIM::Verifier for fetching all applicable sender/author signing policies * bugfixes: * fixed regexp used to detect header field names (issue #2803465) * various fixes to ADSP checking * fixed a runaway regular expression in the canonicalization routines (patch provided by Mark Martinec) * Signer object would die if first line of input wasn't a header (rt.cpan.org issue #46179) * Mon Jul 20 2009 varkoly@suse.de - new version: 0.33 * signature wrapping was still messed up, hopefully all bugs fixed now * signature wrapping would sometimes cause improper preparation of DKIM signatures, with "simple" canonicalization (issue #2257046) * test scripts: * the included corpus is now verified using a fake-DNS resolver, which means the test corpus can validate even when your DNS servers are really slow * Mon Jan 26 2009 varkoly@suse.de - bnc#469321 - Requirements not met within perl-Mail-DKIM * Tue Oct 28 2008 varkoly@suse.de - nwe version 0.32 * removed requirement for Digest::SHA1 (issue #1832549). We now use the more capable Digest::SHA module for SHA-1 and SHA-256. * bugfixes: * granularity checking should be case-sensitive (issue #1938112). * identity tag now uses quoted-printable encoding (issue #1839015). * API improvement: * implemented identity_source() for DkSignature objects * Wed Jul 16 2008 varkoly@suse.de - Initial version of perl-Mail-DKIM