Package: php-crypt-gpg[...]
Version: 1.6.9-3
Severity: normal
Tags: patch
Control: affects -1 + src:gnupg2
GnuPG has traditionally disregarded the OpenPGP standard about Cleartext Signature Framework (CSF) messages.
Going back to RFC 2440 (in 1998!) the OpenPGP specification has always
said:
The line ending (i.e. the <CR><LF>) before the '-----BEGIN PGP SIGNATURE-----' line that terminates the signed text is not
considered part of the signed text.
However, the Crypt_GPG test suite expects this CSF message:
```
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello, Bob! Goodbye, Alice!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFI0vkCwJfZ7JTAY2MRAgzTAKCRecYZsCS+PE46Fa2QLTEP8XGLwwCfQEAL qO+KlKcldtYdMZH9AA+KOLQ=
=EO2G
-----END PGP SIGNATURE-----
```
to declare its content *with* the trailing newline:
"Hello, Bob! Goodbye, Alice!\n"
Upstream GnuPG has ignored this specfication
(https://dev.gnupg.org/T7106), but GnuPG in debian is now in alignment
with the specification.
The attached patch should let php-crypt-gpg complete its test suite correctly.
I've also opened https://salsa.debian.org/php-team/pear/php-crypt-gpg/-/merge_requests/1
with this same patch.
On 2025-02-27 Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:
Package: php-crypt-gpg
I think this is a bit worrying.
php-crypt-gpg 1.6.9-3 can be built against gnupg 2.2.46-1 but fails
against gnupg 2.2.46-3 and later. And vice versa the patched testsuite
of php-crypt-gpg 1.6.9-4 only works with gnupg 2.2.46-3 (or similarily patched versions of 2.4).
So this cannot be applied upstream. Afaiui this is nowadays niche, non-recommended usage of gnupg so I wonder whether the cost/benefit
ratio for applying this patch to our gnupg packages (or including it
in FreePG) is good enough.
On Wed 2025-03-12 18:13:49 +0100, Andreas Metzler wrote:[...]
php-crypt-gpg 1.6.9-3 can be built against gnupg 2.2.46-1 but fails
against gnupg 2.2.46-3 and later. And vice versa the patched testsuite
of php-crypt-gpg 1.6.9-4 only works with gnupg 2.2.46-3 (or similarily
patched versions of 2.4).
yes, i think that's correct. If you'd prefer, i can offer a patch to php-crypt-gpg's test suite that accepts whether there's a trailing
newline or not. That kind of flexible patch could be upstreamable, and
would work with a patched or non-patched GnuPG.
[...]So this cannot be applied upstream. Afaiui this is nowadays niche,
non-recommended usage of gnupg so I wonder whether the cost/benefit
ratio for applying this patch to our gnupg packages (or including it
in FreePG) is good enough.
if we want GnuPG to interoperate with standard-following OpenPGP tools,
then we need GnuPG to sign the material that is actually passed in, and
emit the material that is actually signed. While i agree that the CSF
is deprecated, it is still widely used (e.g. debian's InRelease uses
it), and any interoperability test that tries to round-trip data through
two different implementations will flag this as a problem.
I see the goal of my debian GnuPG work as being that we should provide a
tool to debian users that will interoperate with any OpenPGP
implementation as best as we can.
On Wed 2025-03-12 18:13:49 +0100, Andreas Metzler wrote:
php-crypt-gpg 1.6.9-3 can be built against gnupg 2.2.46-1 but fails
against gnupg 2.2.46-3 and later. And vice versa the patched testsuite
of php-crypt-gpg 1.6.9-4 only works with gnupg 2.2.46-3 (or similarily
patched versions of 2.4).
yes, i think that's correct. If you'd prefer, i can offer a patch to php-crypt-gpg's test suite that accepts whether there's a trailing
newline or not. That kind of flexible patch could be upstreamable, and
would work with a patched or non-patched GnuPG.
On Wed, 12 Mar 2025 at 15:13:03 -0400, Daniel Kahn Gillmor wrote:
On Wed 2025-03-12 18:13:49 +0100, Andreas Metzler wrote:
php-crypt-gpg 1.6.9-3 can be built against gnupg 2.2.46-1 but fails
against gnupg 2.2.46-3 and later. And vice versa the patched testsuite
of php-crypt-gpg 1.6.9-4 only works with gnupg 2.2.46-3 (or similarily
patched versions of 2.4).
yes, i think that's correct. If you'd prefer, i can offer a patch to
php-crypt-gpg's test suite that accepts whether there's a trailing
newline or not. That kind of flexible patch could be upstreamable, and
would work with a patched or non-patched GnuPG.
FWIW, as a current php-crypt-gpg uploader I don't mind having to
maintain such trivial patch to the test suite in order to fix FTBFS with Debian's gpg. Wouldn't mind a more complex upstreamable patch of
course, but I don't consider this to be a blocker.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 480 |
Nodes: | 16 (2 / 14) |
Uptime: | 250:41:12 |
Calls: | 9,532 |
Files: | 13,650 |
Messages: | 6,137,993 |