From: Sanel Zukan Date: Fri, 1 Jul 2016 10:16:07 +0000 (+0200) Subject: Issue with verifying cleartext signed messages X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bac0ea734044ea9be136022da254dfc259f24749;p=notmuch-archives.git Issue with verifying cleartext signed messages --- diff --git a/86/443f6f2a8e14865ab417280f3d061578015d5d b/86/443f6f2a8e14865ab417280f3d061578015d5d new file mode 100644 index 000000000..d90867014 --- /dev/null +++ b/86/443f6f2a8e14865ab417280f3d061578015d5d @@ -0,0 +1,116 @@ +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 BF03D6DE012F + for ; Fri, 1 Jul 2016 03:16:20 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.82 +X-Spam-Level: +X-Spam-Status: No, score=-0.82 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, + RCVD_IN_MSPIKE_WL=-0.01, 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 W7ouh-8LjJaU for ; + Fri, 1 Jul 2016 03:16:13 -0700 (PDT) +Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com + [74.125.82.44]) by arlo.cworth.org (Postfix) with ESMTPS id ABB756DE00C8 for + ; Fri, 1 Jul 2016 03:16:12 -0700 (PDT) +Received: by mail-wm0-f44.google.com with SMTP id a66so22513205wme.0 + for ; Fri, 01 Jul 2016 03:16:12 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:user-agent:date:message-id:mime-version; + bh=zx6MR5bombon4brTI5h1GYaWLReBxvMOSDIqKz17158=; + b=MsPVDXl+Y7yeZAJeBckgbGuiEwZAzOaDCqnz5W4ZgEhzjkzuqvhbz2ko5JSQEw3RTN + Dp9sl0o8lnzb7r1VI38k2NQPzKsVW6lBTEeEqyz9ApJnU3uif43g9h5bmrjErmnTV2oc + elUrOSUH9sd2ohMM9fbH6Vqh6XnPsHrHDfVz8sKj1i0iUpo3AsfjesrwxuazGI0wCQrZ + Igo2f+95CN9xdB2nqbXQipMSv1RJZEEyEUsMDySLiSgDjyKF88OZ1asJHBvrKulG8eXw + UZqTv1tWHS8yyH4SQuevC4m27pm42BFdOwELYOpjJb7GtZggVoPEj0nl+AJZz83ahA5U + dO5Q== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:user-agent:date:message-id + :mime-version; + bh=zx6MR5bombon4brTI5h1GYaWLReBxvMOSDIqKz17158=; + b=nJwV/hgyhSomSQf7y3tObzlJIrPzMic+7szCpYHkfkHWGs5235pEWKqxqMUeyiBOvi + NwA7S2eTbMjtE8gVUXWdoRKv09Pbbj0QeKE/43iXFYF2IYROnoutiSyc2PBE31oa4P03 + K7UCX800geQkvu7OD0rRjeu0nygC70TH4DbMEt4nav9L/0YQqeCiYBqIIFEtmPynEdZ/ + cn8lqMGWbCAtcW2/QqZ2FUBfkvAdxG5+jfzoTx7mFq0pusJRKiM8yyCakaIzMYrAt0b0 + xaJS1NY67KwGUSqq5/BKnXXpV97GmQNVA9Cq4+cE/9d7nwmnnA8yC/As5E40IoOGhKFo + RQVg== +X-Gm-Message-State: + ALyK8tI2oyexv6tGmVjO63D3Tg59KjTXvbflWCEBV277OyYKJL8jmNOOvYYFTwjMQt/jkA== +X-Received: by 10.28.211.142 with SMTP id k136mr32356208wmg.29.1467368169661; + Fri, 01 Jul 2016 03:16:09 -0700 (PDT) +Received: from localhost (cable-146-255-131-70.dynamic.telemach.ba. + [146.255.131.70]) + by smtp.gmail.com with ESMTPSA id i14sm4213609wmf.13.2016.07.01.03.16.08 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 01 Jul 2016 03:16:09 -0700 (PDT) +From: Sanel Zukan +To: notmuch@notmuchmail.org +Subject: Issue with verifying cleartext signed messages +User-Agent: Notmuch/0.21 (http://notmuchmail.org) +Date: Fri, 01 Jul 2016 12:16:07 +0200 +Message-ID: <87oa6hbr4o.fsf@darkstar.example.net> +MIME-Version: 1.0 +Content-Type: text/plain +X-Mailman-Approved-At: Fri, 01 Jul 2016 04:35:16 -0700 +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: Fri, 01 Jul 2016 10:16:20 -0000 + +Hi, + +I'm using epa-verify-cleartext-in-region to verify cleartext signed +messages and noticed it will sometimes fail with notmuch, especially +when target mail message is part of longer thread. + +For example, when signed mail is first in thread, body will look like: + +-----BEGIN PGP SIGNED MESSAGE----- + +-----BEGIN PGP SIGNATURE----- + +-----END PGP SIGNATURE----- + +and epa-verify-cleartext-in-region will correctly capture and verify it. +However, when the message is second or third in thread, notmuch will +append spaces in front of it, making it looks like this: + + -----BEGIN PGP SIGNED MESSAGE----- + + -----BEGIN PGP SIGNATURE----- + + -----END PGP SIGNATURE----- + +epa-verify-cleartext-in-region will fail here with: "Invalid cleartext +signed message". + +Error is reproducible - copy the body of message with signature in new +buffer, remove starting spaces and epa-verify-cleartext-in-region will +work. + +Any idea how to solve this? Or even better, is it possible to display +messages flat, without tree view. + +If you can, please CC me with reply as I'm not member of this list. + +Thanks in advace. + +Best, +Sanel