The output of gpgsm changed slightly in gnupg-2.3, causing the git tests for x509 signatures to be skipped. Update the tests to use the machine-parseable --with-colons output. It also appears that we need to reload the gpg-agent in order to pick up the changes the test library makes to the trustlist.txt file. It might be better to store that file with the other gpg files in the test suite rather than generating it. While we're at it, reload all the gpg components rather than just gpg-agent. Adjust the earlier gpgconf kill to use the 'all' keyword as well. Next up, gpgsm removed a debug line from it's output which exposes a problem in git's gpg-interface code. The git code presumes that the '[GNUPG:] SIG_CREATED' line will follow a newline. That is no longer true. The debug line was removed from GnuPG in a6d2f3133 (sm: Replace some debug message by log_error or log_info, 2020-04-21). Finally, a minor bug in gpgsm causes the error message returned when a certificate is not found to differ from previous versions¹. Extend the grep pattern in the test suite to catch both error messages. ¹ https://lists.gnupg.org/pipermail/gnupg-devel/2021-November/034991.html
41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
From da340dd76714474126f73f6b53087da0ffd4e8d8 Mon Sep 17 00:00:00 2001
|
|
From: Todd Zullinger <tmz@pobox.com>
|
|
Date: Fri, 26 Nov 2021 21:11:54 -0500
|
|
Subject: [PATCH] t/lib-gpg: kill all gpg components, not just gpg-agent
|
|
|
|
The gpg-agent is one of several processes that newer releases of GnuPG
|
|
start automatically. Issue a kill to each of them to ensure they do not
|
|
affect separate tests. (Yes, the separate GNUPGHOME should do that
|
|
already. If we find that is case, we could drop the --kill entirely.)
|
|
|
|
In terms of compatibility, the 'all' keyword was added to the --kill &
|
|
--reload options in GnuPG 2.1.18. Debian and RHEL are often used as
|
|
indicators of how a change might affect older systems we often try to
|
|
support.
|
|
|
|
- Debian Strech (old old stable), which has limited security support
|
|
until June 2022, has GnuPG 2.1.18 (or 2.2.x in backports).
|
|
|
|
- CentOS/RHEL 7, which is supported until June 2024, has GnuPG
|
|
2.0.22, which lacks the --kill option, so the change won't have
|
|
any impact.
|
|
|
|
Signed-off-by: Todd Zullinger <tmz@pobox.com>
|
|
---
|
|
t/lib-gpg.sh | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
|
|
index d675698a2d..2bb309a8c1 100644
|
|
--- a/t/lib-gpg.sh
|
|
+++ b/t/lib-gpg.sh
|
|
@@ -40,7 +40,7 @@ test_lazy_prereq GPG '
|
|
# > lib-gpg/ownertrust
|
|
mkdir "$GNUPGHOME" &&
|
|
chmod 0700 "$GNUPGHOME" &&
|
|
- (gpgconf --kill gpg-agent || : ) &&
|
|
+ (gpgconf --kill all || : ) &&
|
|
gpg --homedir "${GNUPGHOME}" --import \
|
|
"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
|
|
gpg --homedir "${GNUPGHOME}" --import-ownertrust \
|