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 917C56DE0083 for ; Tue, 14 Nov 2017 05:21:13 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[AWL=0.010, 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 xWRQKuXxm8CY for ; Tue, 14 Nov 2017 05:21:13 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id DC0B06DE0068 for ; Tue, 14 Nov 2017 05:21:12 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1eEb9M-0002cB-5l; Tue, 14 Nov 2017 08:21:12 -0500 Received: (nullmailer pid 13377 invoked by uid 1000); Tue, 14 Nov 2017 13:21:10 -0000 From: David Bremner To: Daniel Kahn Gillmor , Notmuch Mail Subject: Re: [PATCH 07/18] crypto: new decryption policy "auto" In-Reply-To: <20171025065203.24403-8-dkg@fifthhorseman.net> References: <20171025065203.24403-1-dkg@fifthhorseman.net> <20171025065203.24403-8-dkg@fifthhorseman.net> Date: Tue, 14 Nov 2017 09:21:10 -0400 Message-ID: <87lgj99et5.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Tue, 14 Nov 2017 13:21:13 -0000 Daniel Kahn Gillmor writes: > GMimeObject * > -_notmuch_crypto_decrypt (notmuch_message_t *message, > +_notmuch_crypto_decrypt (notmuch_decryption_policy_t decrypt, > + notmuch_message_t *message, > g_mime_3_unused(GMimeCryptoContext* crypto_ctx), > GMimeMultipartEncrypted *part, > GMimeDecryptResult **decrypt_result, > GError **err) > { > GMimeObject *ret = NULL; > + if (decrypt == NOTMUCH_DECRYPT_FALSE) > + return NULL; I'm going to assume that all is well and no return value from _notmuch_crypto_decrypt is used without guarding for NULL. d