Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Mail-DKIM for openSUSE:Factory checked in at 2026-11-19 16:53:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Mail-DKIM (Old) and /work/SRC/openSUSE:Factory/.perl-Mail-DKIM.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mail-DKIM" Thu Nov 19 16:53:59 2026 rev:38 rq:1398404 version:1.20261116 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Mail-DKIM/perl-Mail-DKIM.changes 2026-11-09 16:03:33.442080350 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Mail-DKIM.new.1251/perl-Mail-DKIM.changes 2026-11-19 16:54:20.790828477 +0100 @@ -1,0 +2,20 @@ +Tue Nov 17 14:25:58 UTC 2026 - Tina Müller <[email protected]> + +- updated to 1.20261116 + see /usr/share/doc/packages/perl-Mail-DKIM/Changes + + 1.20261116 2026-11-17 Australia/Melbourne + * Security: the verifier now rejects (result "invalid") a + DKIM-Signature that has no h= tag or an empty one, whose h= tag + doesn't include From, or that has no bh= tag, as RFC 6376 requires. + The check meant to reject a missing h= tag never fired, so such a + signature covered none of the message's header fields, and without + bh= not its body either, yet still passed. One such signature, made + with a key published under the signer's own d= domain, verified on + any message. Signatures made without bh= by pre-standard drafts of + DKIM are now rejected too + Thanks to Jakub Kozub + * Document that the ARC verifier accepts an ARC-Message-Signature with + an empty or missing h= tag, as the ARC test suite expects + +------------------------------------------------------------------- Old: ---- Mail-DKIM-1.20261105.tar.gz New: ---- Mail-DKIM-1.20261116.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Mail-DKIM.spec ++++++ --- /var/tmp/diff_new_pack.njopiD/_old 2026-11-19 16:54:21.918876293 +0100 +++ /var/tmp/diff_new_pack.njopiD/_new 2026-11-19 16:54:21.920876377 +0100 @@ -18,7 +18,7 @@ %define cpan_name Mail-DKIM Name: perl-Mail-DKIM -Version: 1.20261105 +Version: 1.20261116 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Signs/verifies Internet mail with DKIM/DomainKey signatures ++++++ Mail-DKIM-1.20261105.tar.gz -> Mail-DKIM-1.20261116.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/Changes new/Mail-DKIM-1.20261116/Changes --- old/Mail-DKIM-1.20261105/Changes 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/Changes 2026-11-16 23:21:37.000000000 +0100 @@ -1,5 +1,19 @@ This file summarizes what's changed between releases of Mail-DKIM. +1.20261116 2026-11-17 Australia/Melbourne + * Security: the verifier now rejects (result "invalid") a + DKIM-Signature that has no h= tag or an empty one, whose h= tag + doesn't include From, or that has no bh= tag, as RFC 6376 requires. + The check meant to reject a missing h= tag never fired, so such a + signature covered none of the message's header fields, and without + bh= not its body either, yet still passed. One such signature, made + with a key published under the signer's own d= domain, verified on + any message. Signatures made without bh= by pre-standard drafts of + DKIM are now rejected too + Thanks to Jakub Kozub + * Document that the ARC verifier accepts an ARC-Message-Signature with + an empty or missing h= tag, as the ARC test suite expects + 1.20261105 2026-11-06 Australia/Melbourne * Don't canonicalize ARC-Seals once the ARC chain has failed, and only match ARC-Authentication-Results at the start of a header field diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/MANIFEST new/Mail-DKIM-1.20261116/MANIFEST --- old/Mail-DKIM-1.20261105/MANIFEST 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/MANIFEST 2026-11-16 23:21:37.000000000 +0100 @@ -171,6 +171,7 @@ t/test.key t/test5.txt t/textwrap.t +t/verifier-required-tags.t t/verifier.t t/verifier_strict.t weaver.ini diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/META.json new/Mail-DKIM-1.20261116/META.json --- old/Mail-DKIM-1.20261105/META.json 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/META.json 2026-11-16 23:21:37.000000000 +0100 @@ -69,7 +69,7 @@ "web" : "https://github.com/fastmail/mail-dkim/" } }, - "version" : "1.20261105", + "version" : "1.20261116", "x_contributors" : [ "Aaron Thompson <[email protected]>", "Bron Gondwana <[email protected]>", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/META.yml new/Mail-DKIM-1.20261116/META.yml --- old/Mail-DKIM-1.20261105/META.yml 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/META.yml 2026-11-16 23:21:37.000000000 +0100 @@ -38,7 +38,7 @@ resources: bugtracker: https://github.com/fastmail/mail-dkim/issues repository: git://github.com/fastmail/mail-dkim.git -version: '1.20261105' +version: '1.20261116' x_contributors: - 'Aaron Thompson <[email protected]>' - 'Bron Gondwana <[email protected]>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/Makefile.PL new/Mail-DKIM-1.20261116/Makefile.PL --- old/Mail-DKIM-1.20261105/Makefile.PL 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/Makefile.PL 2026-11-16 23:21:37.000000000 +0100 @@ -41,7 +41,7 @@ "YAML::XS" => 0, "lib" => 0 }, - "VERSION" => "1.20261105", + "VERSION" => "1.20261116", "test" => { "TESTS" => "t/*.t" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/README new/Mail-DKIM-1.20261116/README --- old/Mail-DKIM-1.20261105/README 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/README 2026-11-16 23:21:37.000000000 +0100 @@ -1,5 +1,5 @@ This archive contains the distribution Mail-DKIM, -version 1.20261105: +version 1.20261116: Signs/verifies Internet mail with DKIM/DomainKey signatures diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/ARC/MessageSignature.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/ARC/MessageSignature.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/ARC/MessageSignature.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/ARC/MessageSignature.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::ARC::MessageSignature; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: Subclass of Mail::DKIM::Signature which represents a ARC-Message-Signature header # Copyright 2017 FastMail Pty Ltd. All Rights Reserved. @@ -70,7 +70,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 CONSTRUCTORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/ARC/Seal.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/ARC/Seal.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/ARC/Seal.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/ARC/Seal.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::ARC::Seal; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: represents a ARC-Seal header # Copyright 2017 FastMail Pty Ltd. All Rights Reserved. @@ -77,7 +77,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 CONSTRUCTORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/ARC/Signer.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/ARC/Signer.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/ARC/Signer.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/ARC/Signer.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::ARC::Signer; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: generates a DKIM signature for a message # Copyright 2017 FastMail Pty Ltd. All Rights Reserved. @@ -672,7 +672,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/ARC/Verifier.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/ARC/Verifier.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/ARC/Verifier.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/ARC/Verifier.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::ARC::Verifier; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: verifies an ARC-Sealed message # Copyright 2017 FastMail Pty Ltd. All Rights Reserved. @@ -439,6 +439,9 @@ $self->{signature_reject_reason} = 'missing BH tag'; return ( 'fail', $self->{signature_reject_reason} ); } + + # an empty or missing h= is accepted, unlike in a DKIM-Signature, + # as the ARC test suite expects; see "ARC-Message-Signature h= tag" if ( ( $signature->get_tag('h') || '' ) =~ /arc-seal/i ) { # cannot cover AS $self->{signature_reject_reason} = @@ -671,7 +674,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 SYNOPSIS @@ -737,6 +740,18 @@ if ALL ARC-Seal headers pass and the highest index (i=) ARC-Message-Signature passes, then the seal is intact. +=head2 ARC-Message-Signature h= tag + +RFC 8617, 4.1.2 gives the ARC-Message-Signature the semantics of a +DKIM-Signature, which suggests that its h= tag, like that of a +DKIM-Signature (RFC 6376, 3.5 and 6.1.1), must not be empty and must +include From. Unlike L<Mail::DKIM::Verifier>, this verifier does not +enforce that: an ARC-Message-Signature with an empty or missing h= tag +covers no header fields, but can still pass. This follows the ARC +draft validation test suite, which expects an empty h= to pass +(ams_fields_h_empty). The bh= tag is required, so the body is always +covered, and the ARC-Seal covers the ARC-Message-Signature itself. + =head1 CONSTRUCTOR =head2 new() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/Base.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/Base.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/Base.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/Base.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Algorithm::Base; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: base class for DKIM "algorithms" # Copyright 2005-2007 Messiah College. All rights reserved. @@ -187,7 +187,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/dk_rsa_sha1.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/dk_rsa_sha1.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/dk_rsa_sha1.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/dk_rsa_sha1.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Algorithm::dk_rsa_sha1; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: Base algorithm class # Copyright 2005-2006 Messiah College. All rights reserved. @@ -134,7 +134,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/ed25519_sha256.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/ed25519_sha256.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/ed25519_sha256.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/ed25519_sha256.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Algorithm::ed25519_sha256; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: ed25519 sha256 algorithm class # Copyright 2005-2006 Messiah College. All rights reserved. @@ -67,7 +67,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/rsa_sha1.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/rsa_sha1.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/rsa_sha1.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/rsa_sha1.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Algorithm::rsa_sha1; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: rsa sha1 algorithm class # Copyright 2005-2006 Messiah College. All rights reserved. @@ -66,7 +66,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/rsa_sha256.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/rsa_sha256.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Algorithm/rsa_sha256.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Algorithm/rsa_sha256.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Algorithm::rsa_sha256; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: rsa sha256 algorithm class # Copyright 2005-2006 Messiah College. All rights reserved. @@ -66,7 +66,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/AuthorDomainPolicy.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/AuthorDomainPolicy.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/AuthorDomainPolicy.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/AuthorDomainPolicy.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::AuthorDomainPolicy; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: represents an Author Domain Signing Practices (ADSP) record # Copyright 2005-2009 Messiah College. @@ -195,7 +195,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/Base.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/Base.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/Base.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/Base.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Canonicalization::Base; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: base class for canonicalization methods # Copyright 2005-2007 Messiah College. All rights reserved. @@ -85,7 +85,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/DkCommon.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/DkCommon.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/DkCommon.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/DkCommon.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Canonicalization::DkCommon; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: dk common canonicalization # Copyright 2005-2006 Messiah College. All rights reserved. @@ -150,7 +150,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/DkimCommon.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/DkimCommon.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/DkimCommon.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/DkimCommon.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Canonicalization::DkimCommon; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: common canonicalization # Copyright 2005-2007 Messiah College. All rights reserved. @@ -44,10 +44,10 @@ # # This is described in 5.4 of RFC4871. - # presence of a h= tag is mandatory... - unless ( defined $self->{Signature}->headerlist ) { - die "Error: h= tag is required for this canonicalization\n"; - } + # Mail::DKIM::Verifier rejects a DKIM signature without a usable h= + # tag before it gets here. An ARC-Message-Signature with an empty h= + # is canonicalized as it is (see Mail::DKIM::ARC::Verifier), and the + # signer sets h= after this has run. # the message headers grouped by name, bottom-up, so each name in h= # costs one lookup rather than a scan of the header; the grouping is @@ -149,7 +149,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/dk_nofws.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/dk_nofws.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/dk_nofws.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/dk_nofws.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Canonicalization::dk_nofws; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: nofws canonicalization # Copyright 2005-2006 Messiah College. All rights reserved. @@ -45,7 +45,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/dk_simple.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/dk_simple.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/dk_simple.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/dk_simple.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Canonicalization::dk_simple; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: dk simple canonicalization # Copyright 2005 Messiah College. All rights reserved. @@ -75,7 +75,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/nowsp.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/nowsp.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/nowsp.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/nowsp.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Canonicalization::nowsp; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: nowsp canonicalization # Copyright 2005 Messiah College. All rights reserved. @@ -57,7 +57,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/relaxed.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/relaxed.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/relaxed.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/relaxed.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Canonicalization::relaxed; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: common canonicalization # Copyright 2005 Messiah College. All rights reserved. @@ -123,7 +123,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/seal.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/seal.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/seal.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/seal.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Canonicalization::seal; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: arc seal canonicalization # Copyright 2017 FastMail Pty Ltd. All Rights Reserved. @@ -165,7 +165,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/simple.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/simple.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Canonicalization/simple.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Canonicalization/simple.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Canonicalization::simple; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: simple canonicalization # Copyright 2005 Messiah College. All rights reserved. @@ -96,7 +96,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Common.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Common.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Common.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Common.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Common; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: Common class for Mail::DKIM # Copyright 2005-2007 Messiah College. All rights reserved. @@ -182,7 +182,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/DNS.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/DNS.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/DNS.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/DNS.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::DNS; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: performs DNS queries for Mail::DKIM # Copyright 2007, 2012 Messiah College. All rights reserved. @@ -184,7 +184,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/DkPolicy.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/DkPolicy.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/DkPolicy.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/DkPolicy.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::DkPolicy; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: represents a DomainKeys Sender Signing Policy record # Copyright 2005-2009 Messiah College. @@ -172,7 +172,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/DkSignature.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/DkSignature.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/DkSignature.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/DkSignature.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::DkSignature; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: represents a DomainKeys-Signature header # Copyright 2005-2006 Messiah College. All rights reserved. @@ -252,7 +252,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 CONSTRUCTORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/DkimPolicy.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/DkimPolicy.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/DkimPolicy.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/DkimPolicy.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::DkimPolicy; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: represents a DKIM Sender Signing Practices record # Copyright 2005-2007 Messiah College. @@ -193,7 +193,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Key.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Key.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Key.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Key.pm 2026-11-16 23:21:37.000000000 +0100 @@ -2,7 +2,7 @@ use strict; use warnings; # ABSTRACT: Represents a DKIM Key -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # Copyright 2006 Jason Long. All rights reserved. # @@ -101,7 +101,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/KeyValueList.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/KeyValueList.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/KeyValueList.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/KeyValueList.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::KeyValueList; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: Represents a Key/Value list # Copyright 2005-2007 Messiah College. All rights reserved. @@ -203,7 +203,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/MessageParser.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/MessageParser.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/MessageParser.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/MessageParser.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::MessageParser; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: Signs/verifies Internet mail with DKIM/DomainKey signatures # Copyright 2005 Messiah College. All rights reserved. @@ -175,7 +175,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Policy.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Policy.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Policy.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Policy.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Policy; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: abstract base class for originator "signing" policies # Copyright 2005-2007 Messiah College. @@ -163,7 +163,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/PrivateKey.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/PrivateKey.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/PrivateKey.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/PrivateKey.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::PrivateKey; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: a private key loaded in memory for DKIM signing # Copyright 2005-2007 Messiah College. All rights reserved. @@ -195,7 +195,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/PublicKey.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/PublicKey.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/PublicKey.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/PublicKey.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::PublicKey; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: Represents a DKIM key # Copyright 2005 Messiah College. All rights reserved. @@ -522,7 +522,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 CONSTRUCTOR diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Signature.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Signature.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Signature.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Signature.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Signature; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: represents a DKIM-Signature header # Copyright 2005-2007 Messiah College. All rights reserved. @@ -620,7 +620,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 CONSTRUCTORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Signer.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Signer.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Signer.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Signer.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Signer; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: generates a DKIM signature for a message # Copyright 2005-2007 Messiah College. All rights reserved. @@ -445,7 +445,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/SignerPolicy.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/SignerPolicy.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/SignerPolicy.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/SignerPolicy.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::SignerPolicy; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: determines signing parameters for a message # Copyright 2005-2006 Messiah College. All rights reserved. @@ -24,7 +24,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/TextWrap.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/TextWrap.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/TextWrap.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/TextWrap.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::TextWrap; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: text wrapping module written for use with DKIM use Carp; @@ -176,7 +176,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Verifier.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Verifier.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM/Verifier.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM/Verifier.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM::Verifier; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: verifies a DKIM-signed message # Copyright 2005-2009 Messiah College. All rights reserved. @@ -225,6 +225,31 @@ return 0; } + # DomainKeys signatures have no bh= tag, and their h= tag is optional + return 1 if $signature->isa('Mail::DKIM::DkSignature'); + + unless ( $signature->body_hash ) { + + # no body hash, so the signature wouldn't cover the body + $self->{signature_reject_reason} = 'missing bh tag'; + return 0; + } + + my @headers = $signature->headerlist; + unless (@headers) { + + # no signed header fields (RFC 6376, 3.5: h= MUST NOT be empty) + $self->{signature_reject_reason} = 'missing h tag'; + return 0; + } + + unless ( grep { $_ eq 'from' } @headers ) { + + # RFC 6376, 6.1.1: a signature that doesn't cover From is ignored + $self->{signature_reject_reason} = 'From field not signed'; + return 0; + } + return 1; } @@ -506,7 +531,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/lib/Mail/DKIM.pm new/Mail-DKIM-1.20261116/lib/Mail/DKIM.pm --- old/Mail-DKIM-1.20261105/lib/Mail/DKIM.pm 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/lib/Mail/DKIM.pm 2026-11-16 23:21:37.000000000 +0100 @@ -1,7 +1,7 @@ package Mail::DKIM; use strict; use warnings; -our $VERSION = '1.20261105'; # VERSION +our $VERSION = '1.20261116'; # VERSION # ABSTRACT: Signs/verifies Internet mail with DKIM/DomainKey signatures #require 5.010; @@ -23,7 +23,7 @@ =head1 VERSION -version 1.20261105 +version 1.20261116 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/t/dkim-header-list.t new/Mail-DKIM-1.20261116/t/dkim-header-list.t --- old/Mail-DKIM-1.20261105/t/dkim-header-list.t 2026-11-05 23:45:24.000000000 +0100 +++ new/Mail-DKIM-1.20261116/t/dkim-header-list.t 2026-11-16 23:21:37.000000000 +0100 @@ -69,7 +69,7 @@ sub { $added++; goto &$add_header }; } -my $hlist = join ':', ('x') x 2000; +my $hlist = join ':', 'from', ('x') x 2000; my $msg = join( '', map { "DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example$_.com; s=s; h=$hlist; bh=AAAA; b=AAAA\n" } 1 .. 10 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mail-DKIM-1.20261105/t/verifier-required-tags.t new/Mail-DKIM-1.20261116/t/verifier-required-tags.t --- old/Mail-DKIM-1.20261105/t/verifier-required-tags.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Mail-DKIM-1.20261116/t/verifier-required-tags.t 2026-11-16 23:21:37.000000000 +0100 @@ -0,0 +1,135 @@ +#!/usr/bin/perl -I../lib + +# a DKIM-Signature must have a non-empty h= tag that includes From, and a +# bh= tag (RFC 6376, 3.5 and 6.1.1); without them it covers none of the +# header fields, or not the body, and one signature would pass on any +# message, so the verifier rejects it as invalid + +use strict; +use warnings; +use Test::More tests => 16; + +use Crypt::OpenSSL::RSA; +use Digest::SHA qw(sha256); +use MIME::Base64; +use Mail::DKIM::PrivateKey; +use Mail::DKIM::Verifier; + +my $tdir = -f "t/test.key" ? "t" : "."; +my $keyfile = "$tdir/test.key"; +my $key = Mail::DKIM::PrivateKey->load( File => $keyfile ); + +# publish the test key as test._domainkey.example.org +my $public_key = do { + open my $fh, '<', $keyfile or die "$keyfile: $!"; + local $/; + my $rsa = Crypt::OpenSSL::RSA->new_private_key(<$fh>); + my $pem = $rsa->get_public_key_x509_string; + $pem =~ s/-----[^-]+-----|\s+//g; + $pem; +}; +{ + no warnings 'redefine'; + *Mail::DKIM::DNS::query = sub { + my ( $domain, $type ) = @_; + return () unless lc $domain eq 'test._domainkey.example.org'; + my $txt = "v=DKIM1; k=rsa; p=$public_key"; + return bless \$txt, 'FakeDNS::Record'; + }; +} + +my $BODY = "Hello\015\012"; + +# canonicalize a header field the relaxed way +sub relaxed { + my ($field) = @_; + my ( $name, $value ) = split /:/, $field, 2; + $value =~ s/\015\012//g; + $value =~ s/[ \t]+/ /g; + $value =~ s/^ | $//g; + return lc($name) . ":$value"; +} + +# make a relaxed/relaxed DKIM-Signature by hand, so it can leave out tags +# the signer always adds; $h is the h= value (undef for no h= tag), and +# the fields it names are taken from $header +sub make_signature { + my ( $header, $h, $with_bh ) = @_; + + my $tags = 'v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.org; s=test;'; + $tags .= " h=$h;" if defined $h; + $tags .= ' bh=' . encode_base64( sha256($BODY), '' ) . ';' if $with_bh; + $tags .= ' b='; + + my %fields = map { lc( ( split /:/ )[0] ) => $_ } + split /(?<=\015\012)/, $header; + my $canon = ''; + $canon .= relaxed( $fields{$_} ) . "\015\012" + for grep { exists $fields{$_} } split /:/, lc( $h // '' ); + $canon .= relaxed("DKIM-Signature: $tags"); + + my $b = encode_base64( $key->sign_digest( 'SHA-256', sha256($canon) ), '' ); + return "DKIM-Signature: $tags$b\015\012"; +} + +sub verify { + my ($message) = @_; + my $dkim = Mail::DKIM::Verifier->new; + $dkim->PRINT($message); + $dkim->CLOSE; + return $dkim; +} + +my $header = + "From: alice\@example.org\015\012" . "Subject: hello\015\012"; +my $forged = + "From: ceo\@bank.example\015\012" . "Subject: wire the money\015\012"; + +# a complete signature passes, so the ones below fail for the tag alone +{ + my $sig = make_signature( $header, 'from:subject', 1 ); + my $dkim = verify( $sig . $header . "\015\012" . $BODY ); + is( $dkim->result, 'pass', 'signature with h= and bh= passes' ); + + $dkim = verify( $sig . $forged . "\015\012" . $BODY ); + is( $dkim->result, 'fail', 'and fails once From is changed' ); +} + +my @cases = ( + [ 'no h= tag', undef, 1, 'missing h tag' ], + [ 'empty h= tag', '', 1, 'missing h tag' ], + [ 'h= tag of colons', ' : ', 1, 'missing h tag' ], + [ 'h= tag without From', 'subject', 1, 'From field not signed' ], + [ 'no bh= tag', 'from:subject', 0, 'missing bh tag' ], + [ 'no h= and no bh= tags', undef, 0, 'missing bh tag' ], +); +foreach my $case (@cases) { + my ( $desc, $h, $with_bh, $reason ) = @$case; + my $sig = make_signature( $header, $h, $with_bh ); + + # rewritten header fields, which the signature may not cover + my $dkim = verify( $sig . $forged . "\015\012" . $BODY ); + is( $dkim->result, 'invalid', "$desc: result is invalid" ); + is( $dkim->result_detail, "invalid ($reason)", "$desc: $reason" ); +} + +# a signature that covers From and other fields is still fine if From +# isn't first +{ + my $sig = make_signature( $header, 'subject:from', 1 ); + my $dkim = verify( $sig . $header . "\015\012" . $BODY ); + is( $dkim->result, 'pass', 'From anywhere in h= passes' ); +} + +# the h= tag names are case insensitive +{ + my $sig = make_signature( $header, 'FROM:Subject', 1 ); + my $dkim = verify( $sig . $header . "\015\012" . $BODY ); + is( $dkim->result, 'pass', 'From in upper case in h= passes' ); +} + +package FakeDNS::Record; + +sub type { 'TXT' } +sub txtdata { ${ $_[0] } } +sub char_str_list { ${ $_[0] } } ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.njopiD/_old 2026-11-19 16:54:22.055882100 +0100 +++ /var/tmp/diff_new_pack.njopiD/_new 2026-11-19 16:54:22.057882185 +0100 @@ -1,6 +1,6 @@ -mtime: 1793964745 -commit: 26fa46786c567d1b204d113932d059e017c99657941a72a8403c9f7877cb8533 +mtime: 1794925558 +commit: 9454f315e0531b8cc6cc0ff106267319540796cf78984ea9a853867baab65c6f url: https://src.opensuse.org/perl/perl-Mail-DKIM -revision: 26fa46786c567d1b204d113932d059e017c99657941a72a8403c9f7877cb8533 +revision: 9454f315e0531b8cc6cc0ff106267319540796cf78984ea9a853867baab65c6f projectscmsync: https://src.opensuse.org/perl/_ObsPrj ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-11-17 15:25:58.000000000 +0100 @@ -0,0 +1 @@ +.osc
