Re: [PATCH 10/20] cli/show: add tests for viewing protected headers

Subject: Re: [PATCH 10/20] cli/show: add tests for viewing protected headers

Date: Fri, 29 Jun 2018 22:17:57 -0400

To: David Bremner, Notmuch Mail

Cc:

From: Daniel Kahn Gillmor


On Sun 2018-06-24 22:31:44 -0300, David Bremner wrote:
> Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:
>
>> +
>> +# TODO:
>> +#  * check S/MIME as well as PGP/MIME
>
> Decrypting S/MIME would be good first step. Or is the feature there
> (with gmime 3.0?) but tests missing? because T355-smime says there is no
> S/MIME decryption.

agreed, though you could argue that S/MIME signatures are relevant to
the cryptographic envelope, even without decryption.

regardless, i think that's orthogonal to this series, so i'm not going
to try to address it now.

>> +#  * process headers protected by signature
>
>> +
>> +test_description='Message decryption with protected headers'
>> +. $(dirname "$0")/test-lib.sh || exit 1
>> +
>> +##################################################
>> +
>> +add_gnupg_home
>> +# Change this if we ship a new test key
>> +FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381"
>
> I wonder if it would be reasonable for add_gnupg_home to define FINGERPRINT

fine with me, i'll include that in the upcoming revised series.

>> +
>> +add_email_corpus protected-headers
>> +
>> +test_begin_subtest "verify protected header is not visible without decryption"
>> +output=$(notmuch show --format=json id:protected-header@crypto.notmuchmail.org)
>> +test_json_nodes <<<"$output" \
>> +                'no_crypto:[0][0][0]!"crypto"' \
>> +                'subject:[0][0][0]["headers"]["Subject"]="encrypted message"'
>
> maybe a pointer to where to find the docs for the json test syntax.

I'll stick a pointer in lib/test-lib.sh's definition of
test_json_nodes() because you suggest it, but i think it would be out of
place to do it here in a specifis test.

   --dkg
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: