summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-06-15 14:23:03 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-06-15 14:23:03 +0200
commitbf7de05c855aea1f1d30e7aafd99700601a7bc4d (patch)
treecfebeabcce497c5650682990c2a2ab58b061dfd5 /test
parenta423a554a821466eeea6865b1e226d8074c2abe6 (diff)
parent33e4d8b32a0baef91342527cce16cd47bcb1ee60 (diff)
merged latest upload
Diffstat (limited to 'test')
-rw-r--r--test/integration/exploid-keyring-with-dupe-subkeys.pubbin0 -> 2016 bytes
-rwxr-xr-xtest/integration/test-apt-key-net-update21
2 files changed, 21 insertions, 0 deletions
diff --git a/test/integration/exploid-keyring-with-dupe-subkeys.pub b/test/integration/exploid-keyring-with-dupe-subkeys.pub
new file mode 100644
index 000000000..02d4e6ee8
--- /dev/null
+++ b/test/integration/exploid-keyring-with-dupe-subkeys.pub
Binary files differ
diff --git a/test/integration/test-apt-key-net-update b/test/integration/test-apt-key-net-update
index 452766b4d..d5205836f 100755
--- a/test/integration/test-apt-key-net-update
+++ b/test/integration/test-apt-key-net-update
@@ -49,6 +49,26 @@ else
msgpass
fi
+
+# test another possible attack vector using subkeys (LP: #1013128)
+msgtest "add_keys_with_verify_against_master_keyring with subkey attack"
+ADD_KEYRING=./keys/exploid-keyring-with-dupe-subkeys.pub
+if add_keys_with_verify_against_master_keyring $ADD_KEYRING $MASTER_KEYRING; then
+ msgfail
+else
+ msgpass
+fi
+
+# ensure the keyring is still empty
+gpg_out=$($GPG --list-keys)
+msgtest "Test if keyring is empty"
+if [ -n "" ]; then
+ msgfail
+else
+ msgpass
+fi
+
+
# test good keyring and ensure we get no errors
ADD_KEYRING=/usr/share/keyrings/ubuntu-archive-keyring.gpg
if add_keys_with_verify_against_master_keyring $ADD_KEYRING $MASTER_KEYRING; then
@@ -72,3 +92,4 @@ uid Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubun
pub 4096R/EFE21092 2012-05-11
uid Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>
' $GPG --list-keys
+