summaryrefslogtreecommitdiffstats
path: root/tests/openpgp/tofu/cross-sigs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:59:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 09:59:15 +0000
commit8de1ee1b2b676b0d07586f0752750dd6b0fb7511 (patch)
treedd46fd7dc3863045696cd0e48032d8a36fa0daf5 /tests/openpgp/tofu/cross-sigs
parentInitial commit. (diff)
downloadgnupg2-8de1ee1b2b676b0d07586f0752750dd6b0fb7511.tar.xz
gnupg2-8de1ee1b2b676b0d07586f0752750dd6b0fb7511.zip
Adding upstream version 2.2.27.upstream/2.2.27upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/openpgp/tofu/cross-sigs/871C2247-1.gpgbin0 -> 1173 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/871C2247-1.txtbin0 -> 321 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/871C2247-2.gpgbin0 -> 1460 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/871C2247-2.txtbin0 -> 333 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/871C2247-3.gpgbin0 -> 1800 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/871C2247-3.txtbin0 -> 334 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/871C2247-4.gpgbin0 -> 2087 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/871C2247-secret.gpgbin0 -> 2475 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/EC38277E-1.gpgbin0 -> 1171 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/EC38277E-1.txtbin0 -> 321 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/EC38277E-2.gpgbin0 -> 1458 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/EC38277E-2.txtbin0 -> 334 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/EC38277E-3.txtbin0 -> 334 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/EC38277E-secret.gpgbin0 -> 2473 bytes
-rw-r--r--tests/openpgp/tofu/cross-sigs/README79
15 files changed, 79 insertions, 0 deletions
diff --git a/tests/openpgp/tofu/cross-sigs/871C2247-1.gpg b/tests/openpgp/tofu/cross-sigs/871C2247-1.gpg
new file mode 100644
index 0000000..f706f70
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/871C2247-1.gpg
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/871C2247-1.txt b/tests/openpgp/tofu/cross-sigs/871C2247-1.txt
new file mode 100644
index 0000000..0bdc1fc
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/871C2247-1.txt
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/871C2247-2.gpg b/tests/openpgp/tofu/cross-sigs/871C2247-2.gpg
new file mode 100644
index 0000000..0b2485f
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/871C2247-2.gpg
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/871C2247-2.txt b/tests/openpgp/tofu/cross-sigs/871C2247-2.txt
new file mode 100644
index 0000000..4d3aaaa
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/871C2247-2.txt
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/871C2247-3.gpg b/tests/openpgp/tofu/cross-sigs/871C2247-3.gpg
new file mode 100644
index 0000000..eb2c435
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/871C2247-3.gpg
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/871C2247-3.txt b/tests/openpgp/tofu/cross-sigs/871C2247-3.txt
new file mode 100644
index 0000000..9b2d49d
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/871C2247-3.txt
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/871C2247-4.gpg b/tests/openpgp/tofu/cross-sigs/871C2247-4.gpg
new file mode 100644
index 0000000..9c98ec1
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/871C2247-4.gpg
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/871C2247-secret.gpg b/tests/openpgp/tofu/cross-sigs/871C2247-secret.gpg
new file mode 100644
index 0000000..a87c61b
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/871C2247-secret.gpg
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/EC38277E-1.gpg b/tests/openpgp/tofu/cross-sigs/EC38277E-1.gpg
new file mode 100644
index 0000000..e6becec
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/EC38277E-1.gpg
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/EC38277E-1.txt b/tests/openpgp/tofu/cross-sigs/EC38277E-1.txt
new file mode 100644
index 0000000..92236be
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/EC38277E-1.txt
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/EC38277E-2.gpg b/tests/openpgp/tofu/cross-sigs/EC38277E-2.gpg
new file mode 100644
index 0000000..d26bd54
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/EC38277E-2.gpg
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/EC38277E-2.txt b/tests/openpgp/tofu/cross-sigs/EC38277E-2.txt
new file mode 100644
index 0000000..b4013d3
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/EC38277E-2.txt
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/EC38277E-3.txt b/tests/openpgp/tofu/cross-sigs/EC38277E-3.txt
new file mode 100644
index 0000000..9b2d49d
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/EC38277E-3.txt
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/EC38277E-secret.gpg b/tests/openpgp/tofu/cross-sigs/EC38277E-secret.gpg
new file mode 100644
index 0000000..1839e3a
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/EC38277E-secret.gpg
Binary files differ
diff --git a/tests/openpgp/tofu/cross-sigs/README b/tests/openpgp/tofu/cross-sigs/README
new file mode 100644
index 0000000..439962b
--- /dev/null
+++ b/tests/openpgp/tofu/cross-sigs/README
@@ -0,0 +1,79 @@
+# How I generate the keys and messages to verify:
+
+# Generate and export two non-conflicting keys.
+gpg --quick-gen-key 'Spy Cow <spy@cow.com>'
+gpg --quick-gen-key 'Spy R. Cow <spy@cow.de>'
+
+KEYIDA=1938C3A0E4674B6C217AC0B987DB2814EC38277E
+KEYIDB=DC463A16E42F03240D76E8BA8B48C6BD871C2247
+
+for KEYID in $KEYIDA $KEYIDB
+do
+ gpg --export $KEYID > tofu-$KEYID.gpg
+ gpg --export-secret-keys $KEYID > tofu-$KEYID-secret.gpg
+done
+
+# Sign some data.
+echo foo | gpg --default-key $KEYIDA -s > tofu-$KEYIDA-1.txt
+echo foo | gpg --default-key $KEYIDB -s > tofu-$KEYIDB-1.txt
+
+# Again, but with an issuer.
+echo foo | gpg --default-key "<spy@cow.com>" -s > tofu-$KEYIDA-2.txt
+echo foo | gpg --default-key "<spy@cow.de>" -s > tofu-$KEYIDB-2.txt
+
+# Have A sign B and vice versa.
+gpg --default-key $KEYIDA --quick-sign $KEYIDB
+gpg --default-key $KEYIDB --quick-sign $KEYIDA
+
+gpg --export $KEYIDA > tofu-$KEYIDA-2.gpg
+gpg --export $KEYIDB > tofu-$KEYIDB-2.gpg
+
+# Cause A and B to conflict.
+gpg --quick-adduid $KEYIDB 'Spy R. Cow <spy@cow.com>'
+gpg --export $KEYIDB > tofu-$KEYIDB-3.gpg
+
+echo foo | gpg --default-key "<spy@cow.com>" -s > tofu-$KEYIDA-3.txt
+echo foo | gpg --default-key "<spy@cow.com>" -s > tofu-$KEYIDB-3.txt
+
+# Have A sign B's conflicting user id.
+gpg --default-key $KEYIDA --quick-sign $KEYIDB
+gpg --export $KEYIDB > tofu-$KEYIDB-4.gpg
+
+exit 0
+
+# In a new directory (so the keys are not ultimately trusted).
+
+D=~/neal/work/gpg/test
+echo 'trust-model tofu+pgp' > gpg.conf
+gpg --import $D/tofu-$KEYIDA.gpg
+gpg --import $D/tofu-$KEYIDB.gpg
+gpg -k
+
+gpg --verify $D/tofu-$KEYIDA-1.txt
+gpg --verify $D/tofu-$KEYIDB-1.txt
+# With an issuer.
+gpg --verify $D/tofu-$KEYIDA-2.txt
+gpg --verify $D/tofu-$KEYIDB-2.txt
+
+# Import the cross signatures.
+gpg --import $D/tofu-$KEYIDA-2.gpg
+gpg --import $D/tofu-$KEYIDB-2.gpg
+gpg -k
+
+gpg --verify $D/tofu-$KEYIDA-1.txt
+gpg --verify $D/tofu-$KEYIDB-1.txt
+# With an issuer.
+gpg --verify $D/tofu-$KEYIDA-2.txt
+gpg --verify $D/tofu-$KEYIDB-2.txt
+
+
+gpg --status-fd=1 --batch --verify $D/tofu-$KEYIDA-3.txt | grep TRUST_UNDEFINED
+gpg --status-fd=1 --batch --verify $D/tofu-$KEYIDB-3.txt | grep TRUST_UNDEFINED
+
+# Import the conflicting user id.
+gpg --import $D/tofu-$KEYIDB-3.gpg
+gpg -k
+
+# Import the cross signature, which should remove the conflict.
+gpg --import $D/tofu-$KEYIDB-4.gpg
+gpg -k