From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 2D9136DE0FE1 for ; Mon, 27 May 2019 03:12:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.042 X-Spam-Level: X-Spam-Status: No, score=-0.042 tagged_above=-999 required=5 tests=[AWL=-0.041, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WPAfVf1b-p0A for ; Mon, 27 May 2019 03:12:52 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 5FCD46DE0F6C for ; Mon, 27 May 2019 03:12:52 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1hVCcd-0008O3-9R; Mon, 27 May 2019 06:12:51 -0400 Received: (nullmailer pid 7254 invoked by uid 1000); Mon, 27 May 2019 10:12:52 -0000 From: David Bremner To: Daniel Kahn Gillmor , Notmuch Mail Subject: Re: [PATCH v2 06/17] cli/show: add information about which headers were protected In-Reply-To: <20190526221610.2833-7-dkg@fifthhorseman.net> References: <20190526221610.2833-1-dkg@fifthhorseman.net> <20190526221610.2833-7-dkg@fifthhorseman.net> Date: Mon, 27 May 2019 07:12:52 -0300 Message-ID: <871s0kkxy3.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 May 2019 10:12:53 -0000 Daniel Kahn Gillmor writes: > The header-mask member of the per-message crypto object allows a > clever UI frontend to mark whether a header was protected (or not). > And if it was protected, it contains enough information to show useful > detail to an interested user. For example, an MUA could offer a "show > what this message's Subject looked like on the wire" feature in expert > mode. > > As before, we only handle Subject for now, but we might be able to > handle other headers in the future. > > Signed-off-by: Daniel Kahn Gillmor > --- > devel/schemata | 6 ++++++ > notmuch-show.c | 21 +++++++++++++++++++++ > test/T356-protected-headers.sh | 4 ++-- > 3 files changed, 29 insertions(+), 2 deletions(-) > > diff --git a/devel/schemata b/devel/schemata > index 72feb7b7..9d3c8d30 100644 > --- a/devel/schemata > +++ b/devel/schemata > @@ -88,9 +88,15 @@ crypto = { > status: sigstatus, > # was the set of signatures described under encrypted cover? > encrypted: bool, > + # which of the headers is covered by sigstatus? > + headers: [header_name*] > }, > decrypted?: { > status: msgdecstatus, > + # map encrypted headers that differed from the outside headers. > + # the value of each item in the map is what that field showed externally > + # (maybe null if it was not present in the external headers). > + header-mask: { header_name: string|null,*} > } I think you also need to add a definition for header_name to schemata (in the same way that messageid is defined as a string). The name "header-mask" is a bit generic, but I don't have my head in this topic like you do. I was thinking of something like "replaced-headers", but it's only a mild suggestion.