X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT350-crypto.sh;h=df2dc7439c1586d2b13a0a558f99f9b89f37c89f;hp=477b397e419e644dbbf48d92b0a7d13b09e373e5;hb=a448879e49fb838a302b4e68d73e63c6b75d9175;hpb=28d7544ae2adfe6467c6b64a3284f5ed13f81e1a diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh index 477b397e..df2dc743 100755 --- a/test/T350-crypto.sh +++ b/test/T350-crypto.sh @@ -5,7 +5,7 @@ # - verification of signatures from expired/revoked keys test_description='PGP/MIME signature verification and decryption' -. ./test-lib.sh +. ./test-lib.sh || exit 1 add_gnupg_home () { @@ -25,8 +25,8 @@ add_gnupg_home () ################################################## add_gnupg_home -# get key fingerprint -FINGERPRINT=$(gpg --no-tty --list-secret-keys --with-colons --fingerprint | grep '^fpr:' | cut -d: -f10) +# Change this if we ship a new test key +FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381" test_expect_success 'emacs delivery of signed message' \ 'emacs_fcc_message \ @@ -316,6 +316,25 @@ test_expect_equal \ "$output" \ "$expected" +test_begin_subtest "Reply within emacs to an encrypted message" +test_emacs "(let ((message-hidden-headers '()) + (notmuch-crypto-process-mime 't)) + (notmuch-show \"subject:test.encrypted.message.002\") + (notmuch-show-reply) + (test-output))" +# the empty To: is probably a bug, but it's not to do with encryption +grep -v -e '^In-Reply-To:' -e '^References:' -e '^Fcc:' -e 'To:' < OUTPUT > OUTPUT.clean +cat <EXPECTED +From: Notmuch Test Suite +Subject: Re: test encrypted message 002 +--text follows this line-- +<#secure method=pgpmime mode=signencrypt> +Notmuch Test Suite writes: + +> This is another test encrypted message. +EOF +test_expect_equal_file EXPECTED OUTPUT.clean + test_begin_subtest "signature verification with revoked key" # generate revocation certificate and load it to revoke key echo "y