[PATCH] tests: Replace short OpenPGP keyids with fingerprints

Justus Winter justus at sequoia-pgp.org
Thu Sep 22 09:57:33 UTC 2022


Short 32-bit OpenPGP key ids are easily spoofed, so their use is
strongly discouraged.  The test suite uses short key ids to refer to
test keys.  This prevents the OpenPGP implementations from rejecting
short key ids, and is a bad example for other developers to follow.

This patch replaces all short key ids with fingerprints.
---
 tests/gnupg/gpg.conf |  7 ++++---
 tests/setup.sh       | 10 +++++-----
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/tests/gnupg/gpg.conf b/tests/gnupg/gpg.conf
index 60ece49..0646926 100644
--- a/tests/gnupg/gpg.conf
+++ b/tests/gnupg/gpg.conf
@@ -1,3 +1,4 @@
-group group1 = E4691410 D774A374
-group group2 = E4691410
-group big group = CF90C77B D774A374 EB7D54A8 E4691410 39E5020C
+group group1 = 9378267629F989A0E96677B7976DD3D6E4691410 70BD448330ACF0653645B8F2B4DDBFF0D774A374
+group group2 = 9378267629F989A0E96677B7976DD3D6E4691410
+group big group = D4C78DB7920E1E27F5416B81CC9DB947CF90C77B 70BD448330ACF0653645B8F2B4DDBFF0D774A374 62EBE74BE834C2EC71E6414595C4B715EB7D54A8 9378267629F989A0E96677B7976DD3D6E4691410 4D2AFBDE67C60F5999D143AFA6E073D439E5020C
+
diff --git a/tests/setup.sh b/tests/setup.sh
index 20dd7ea..058ce0a 100644
--- a/tests/setup.sh
+++ b/tests/setup.sh
@@ -57,8 +57,8 @@ command -v gpg2 &>/dev/null && GPG="gpg2"
 # We don't want any currently running agent to conflict.
 unset GPG_AGENT_INFO
 
-KEY1="CF90C77B"  # pass test key 1
-KEY2="D774A374"  # pass test key 2
-KEY3="EB7D54A8"  # pass test key 3
-KEY4="E4691410"  # pass test key 4
-KEY5="39E5020C"  # pass test key 5
+KEY1="D4C78DB7920E1E27F5416B81CC9DB947CF90C77B"  # pass test key 1
+KEY2="70BD448330ACF0653645B8F2B4DDBFF0D774A374"  # pass test key 2
+KEY3="62EBE74BE834C2EC71E6414595C4B715EB7D54A8"  # pass test key 3
+KEY4="9378267629F989A0E96677B7976DD3D6E4691410"  # pass test key 4
+KEY5="4D2AFBDE67C60F5999D143AFA6E073D439E5020C"  # pass test key 5
-- 
2.30.2



More information about the Password-Store mailing list