diff -Nurd trojita-0.7/tests/Cryptography/keygen.sh trojita-0.7.new/tests/Cryptography/keygen.sh
--- trojita-0.7/tests/Cryptography/keygen.sh	2016-06-15 02:17:23.000000000 -0500
+++ trojita-0.7.new/tests/Cryptography/keygen.sh	2018-07-31 15:36:25.968877808 -0500
@@ -115,7 +115,7 @@
 echo -n "key *\nexpire\nseconds=1\nsave\n" | ${GPG} --no-tty --quiet --command-fd 0 --edit-key "expired@test.trojita.flaska.net"
 
 # extract fingerprint of key to be deleted
-FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@test.trojita.flaska.net | grep fpr | cut -d : -f 10)"
+FINGERPRINT="$(${GPG} --quiet --no-tty --list-keys --with-colons --fingerprint unknown@test.trojita.flaska.net | grep fpr | head -n 1 | cut -d : -f 10)"
 
 # delete key
 yes | DISPLAY="" ${GPG} --quiet --batch --no-tty --delete-secret-and-public-key --yes --command-fd 0 --passphrase-fd 0 "${FINGERPRINT}"