From 72ef16b939235d87015c0164f9a0c66f15251079 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 20 Oct 2010 02:27:25 +0000 Subject: * armor.test: Tweak the bug 1179 test to only run if Twofish is included in the program. The sample message requires Twofish. --- checks/ChangeLog | 5 +++++ checks/armor.test | 26 +++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/checks/ChangeLog b/checks/ChangeLog index 417eb8fd2..5c75b6058 100644 --- a/checks/ChangeLog +++ b/checks/ChangeLog @@ -1,3 +1,8 @@ +2010-10-19 David Shaw + + * armor.test: Tweak the bug 1179 test to only run if Twofish is + included in the program. The sample message requires Twofish. + 2010-05-12 Werner Koch * armor.test: Extend to test bug 1179. diff --git a/checks/armor.test b/checks/armor.test index 80256a029..9fb92925b 100755 --- a/checks/armor.test +++ b/checks/armor.test @@ -739,16 +739,20 @@ wg7Md81a5RI3F2FG8747t9gX # armor filter gpg swalled the CRC line and passed the '-----END...' # line on to the decryption layer. -i=alpha_seckey -info "importing: $i" -eval "(IFS=; echo \"\$$i\")" >x -$GPG --import x || true +# Can only perform this test if we have Twofish -i=nopad_armored_msg -info "checking: $i" -eval "(IFS=; echo \"\$$i\")" >x -if echo "abc" | $GPG --passphrase-fd 0 -o - x > /dev/null ; then - : -else - error "bug#1179 is back in town" +if $GPG --with-colons --list-config ciphername | grep TWOFISH > /dev/null 2>/dev/null ; then + i=alpha_seckey + info "importing: $i" + eval "(IFS=; echo \"\$$i\")" >x + $GPG --import x || true + + i=nopad_armored_msg + info "checking: $i" + eval "(IFS=; echo \"\$$i\")" >x + if echo "abc" | $GPG --passphrase-fd 0 -o - x > /dev/null ; then + : + else + error "bug#1179 is back in town" + fi fi -- cgit v1.2.3