From: David Bremner Date: Sat, 13 Aug 2016 04:30:30 +0000 (+0900) Subject: Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e6cae35142538ce561c94536d4b2bcd5812f3613;p=notmuch-archives.git Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted --- diff --git a/21/884f93a9d2853d30f5d59ae9b1b4f3840d5f1d b/21/884f93a9d2853d30f5d59ae9b1b4f3840d5f1d new file mode 100644 index 000000000..93f3d7200 --- /dev/null +++ b/21/884f93a9d2853d30f5d59ae9b1b4f3840d5f1d @@ -0,0 +1,73 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 4C0426DE273E + for ; Fri, 12 Aug 2016 21:31:11 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.007 +X-Spam-Level: +X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, + SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 4kBjLtZ4yT9t for ; + Fri, 12 Aug 2016 21:31:03 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 20B516DE273B + for ; Fri, 12 Aug 2016 21:31:03 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) + (envelope-from ) + id 1bYQbJ-0005fg-Fr; Sat, 13 Aug 2016 00:31:13 -0400 +Received: (nullmailer pid 24334 invoked by uid 1000); + Sat, 13 Aug 2016 04:30:30 -0000 +From: David Bremner +To: Daniel Kahn Gillmor , + Notmuch Mail +Subject: Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and + multipart/encrypted +In-Reply-To: <1467970047-8013-9-git-send-email-dkg@fifthhorseman.net> +References: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net> + <1467970047-8013-9-git-send-email-dkg@fifthhorseman.net> +User-Agent: Notmuch/0.22.1+61~g2ce0f13 (https://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Sat, 13 Aug 2016 13:30:30 +0900 +Message-ID: <87lh015lzt.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Sat, 13 Aug 2016 04:31:11 -0000 + +Daniel Kahn Gillmor writes: + +> + if (GMIME_IS_MULTIPART_SIGNED (multipart)) { +> + _notmuch_message_add_term (message, "tag", "signed"); +> + /* FIXME: should we try to validate the signature? */ +> + +> + /* FIXME: is it always just the first part that is signed in +> + all multipart/signed messages?*/ +> _index_mime_part (message, +> - g_mime_multipart_get_part (multipart, i)); +> + g_mime_multipart_get_part (multipart, 0)); +> + +> + if (g_mime_multipart_get_count (multipart) > 2) +> + _notmuch_database_log (_notmuch_message_database (message), +> + "Warning: Unexpected extra parts of multipart/signed. Indexing anyway.\n"); +> + } else if (GMIME_IS_MULTIPART_ENCRYPTED (multipart)) { + +I'm confused about this warning, or more importantly about whether there +is an indexing behaviour change here. In particular the extra parts are +indexed in a for loop which is now in the else branch of this if, so as +far as I can tell, it won't be run for multipart/signed