From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6A04J3Uju14sdwAA0tVLHw (envelope-from ) for ; Tue, 12 May 2020 22:30:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MCqYCIQju153cAAAB5/wlQ (envelope-from ) for ; Tue, 12 May 2020 22:30:28 +0000 Received: from arlo.cworth.org (unknown [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CE50F940FF6 for ; Tue, 12 May 2020 22:30:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 9A7CD6DE1465; Tue, 12 May 2020 15:30:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org 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 EYFdr4pCVeSJ; Tue, 12 May 2020 15:30:08 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 5EFA76DE13DB; Tue, 12 May 2020 15:30:00 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 48D406DE13F3 for ; Tue, 12 May 2020 15:29:59 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org 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 0HiZau4DQpoU for ; Tue, 12 May 2020 15:29:56 -0700 (PDT) Received: from che.mayfirst.org (unknown [162.247.75.117]) by arlo.cworth.org (Postfix) with ESMTPS id 437946DE13D6 for ; Tue, 12 May 2020 15:29:56 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1589322594; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=nhShMismLzcGkL16D5jXvXXyoqrz0jfWl37MVwuzAAA=; b=icEbjvtay0qJIkYU/45+DOi1YJFAklkT57kD4yvzR1CufBb6jYOVlZOwWFUAGfYL8P2Lr k+uFl8SX9S9Q57+AQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1589322594; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=nhShMismLzcGkL16D5jXvXXyoqrz0jfWl37MVwuzAAA=; b=KOdBxAmhTm69eVtCRFf+TtBm3ILulMyQ6Zr0NNT+UCmbn5E9U1ORLS3ro6UNGmUdESzGy 9flfP6/cPDlP3Kr+5KGpkafQn8jB7+97XSJHgJ7vA+xT31HUyEGvH4XkonPH71rGV8amVL2 gjt0OSiE5uAFU/7l8vxAW+W+nrGk/r4XYGFc6kEfbzpTcf89NwmOjFNSBnqJS4tN8JCit5g mFg9HgIBnhFMD/3e0pzNlDcqu2WVSPJlHqy4fq0VOvb2pmduybc5IKKipsZPVlVG1UEbeIo YCAzGYz2wIBmlstA0CClRaXV2BeGz8MHCOsMYsYjRdu1EFUhHqkBFGKVS5yw== Received: from fifthhorseman.net (unknown [108.58.6.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id A2258F9A6 for ; Tue, 12 May 2020 18:29:54 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 07D3920E25; Tue, 12 May 2020 18:29:52 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH v2 9/9] smime: Index cleartext of envelopedData when requested Date: Tue, 12 May 2020 18:29:39 -0400 Message-Id: <20200512222939.372093-10-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512222939.372093-1-dkg@fifthhorseman.net> References: <20200512222939.372093-1-dkg@fifthhorseman.net> MIME-Version: 1.0 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 X-Spam-Score: 4.59 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=fifthhorseman.net header.s=2019 header.b=icEbjvta; dkim=fail (body hash did not verify) header.d=fifthhorseman.net header.s=2019rsa header.b=KOdBxAmh; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fifthhorseman.net (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Scan-Result: default: False [4.59 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.44777508446218]; RDNS_NONE(1.00)[]; DWL_DNSWL_BLOCKED(0.00)[50.126.95.6:from]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.00), ip: 50.126.95.6(-0.45)]; R_DKIM_REJECT(1.00)[fifthhorseman.net:s=2019,fifthhorseman.net:s=2019rsa]; R_SPF_ALLOW(-0.20)[+a]; FORGED_SENDER_MAILLIST(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[fifthhorseman.net:-]; MX_GOOD(-0.50)[cached: notmuchmail.org]; MAILLIST(-0.20)[mailman]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[dkg@fifthhorseman.net,notmuch-bounces@notmuchmail.org]; RDNS_DNSFAIL(0.00)[]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[notmuchmail.org:email,fifthhorseman.net:email]; FROM_HAS_DN(0.00)[]; SPF_REPUTATION_HAM(0.00)[-0.41288807146057]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; DNSWL_BLOCKED(0.00)[50.126.95.6:from]; MID_CONTAINS_FROM(1.00)[]; HFILTER_HOSTNAME_UNKNOWN(2.50)[]; RCVD_COUNT_SEVEN(0.00)[8]; DMARC_POLICY_SOFTFAIL(0.10)[fifthhorseman.net : SPF not aligned (relaxed),none] X-TUID: ck144Bff7O5l Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 5 +++-- test/T355-smime.sh | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index da9a3abe..826aa341 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -656,8 +656,9 @@ _index_pkcs7_part (notmuch_message_t *message, _index_mime_part (message, indexopts, toindex, msg_crypto); } else if (p7type == GMIME_SECURE_MIME_TYPE_ENVELOPED_DATA) { _notmuch_message_add_term (message, "tag", "encrypted"); - if (notmuch_indexopts_get_decrypt_policy (indexopts) != NOTMUCH_DECRYPT_FALSE) - _notmuch_database_log (notmuch, "Cannot decrypt PKCS#7 envelopedData (S/MIME encrypted messages)\n"); + _index_encrypted_mime_part (message, indexopts, + part, + msg_crypto); } else { _notmuch_database_log (notmuch, "Cannot currently handle PKCS#7 smime-type '%s'\n", g_mime_object_get_content_type_parameter (part, "smime-type")); diff --git a/test/T355-smime.sh b/test/T355-smime.sh index 1f11725f..170f8649 100755 --- a/test/T355-smime.sh +++ b/test/T355-smime.sh @@ -107,12 +107,10 @@ test_begin_subtest "Reindex cleartext" test_expect_success "notmuch reindex --decrypt=true subject:'test encrypted message 001'" test_begin_subtest "signature is now known" -test_subtest_known_broken output=$(notmuch search subject:"test encrypted message 001") test_expect_equal "$output" "thread:0000000000000002 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message 001 (encrypted inbox signed)" test_begin_subtest "Encrypted body is indexed" -test_subtest_known_broken output=$(notmuch search 'this is a test encrypted message') test_expect_equal "$output" "thread:0000000000000002 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message 001 (encrypted inbox signed)" -- 2.26.2