From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Hans Jerry Illikainen <hji@dyntopia.com>, git@vger.kernel.org
Subject: Re: [PATCH v1 0/2] gpg-interface: prefer check_signature() for GPG verification
Date: Fri, 6 Mar 2020 12:59:38 +0100 (CET) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.2003061257470.46@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <xmqqftem4p6y.fsf@gitster-ct.c.googlers.com>
[-- Attachment #1: Type: text/plain, Size: 2609 bytes --]
Hi Junio,
On Thu, 5 Mar 2020, Junio C Hamano wrote:
> Hans Jerry Illikainen <hji@dyntopia.com> writes:
>
> > This patch refactors the use of verify_signed_buffer() for GPG
> > verification to use check_signature() instead.
> >
> > Previously, both check_signature() and verify_signed_buffer() were used
> > to verify signatures in various parts of Git. However,
> > verify_signed_buffer() does not parse the GPG status message. Instead,
> > it relies entirely on the exit code from GPG coupled with the existence
> > of a GOODSIG string in the output buffer. Unfortunately, the mere
> > prescience of GOODSIG does not necessarily imply a valid signature, as
> > shown by Michał Górny [1].
> >
> > verify_signed_buffer() should be reserved for internal use by
> > check_signature() since check_signature() parses and verifies the status
> > message. This is accomplished in this patch.
> >
> > Changes since v0:
> > * Added regression tests for log-tree and fmt-merge-msg.
> > * Fixed a bug in log-tree.c that caused "No signature" to be shown
> > erroneously.
> > * Fixed a similar bug in fmt-merge-msg.c.
> > * Always invoke signature_check_clear() after check_signature(). The
> > check function may touch the signature_check structure on failure.
>
> Thanks. Will queue. Let's cook it slower and aim for the next
> cycle.
Good call about cooking this slower: it fails both on Windows and on macOS
(see
https://dev.azure.com/gitgitgadget/git/_build/results?buildId=32672&view=ms.vss-test-web.build-test-results-tab&runId=101636&resultId=101463&paneView=debug
for details):
expecting success of 6200.2 'GPG':
git tag -s -m signed-tag-msg signed-good-tag left
++ git tag -s -m signed-tag-msg signed-good-tag left
error: gpg failed to sign the data
error: unable to sign the tag
error: last command exited with $?=128
Not very helpful log, I must say.
Ciao,
Dscho
>
> > [1] https://dev.gentoo.org/~mgorny/articles/attack-on-git-signature-verification.html
> >
> > Hans Jerry Illikainen (2):
> > t: increase test coverage of signature verification output
> > gpg-interface: prefer check_signature() for GPG verification
> >
> > builtin/fmt-merge-msg.c | 11 ++--
> > gpg-interface.c | 97 +++++++++++++++++------------------
> > gpg-interface.h | 9 ----
> > log-tree.c | 34 ++++++-------
> > t/t4202-log.sh | 106 +++++++++++++++++++++++++++++++++++++++
> > t/t6200-fmt-merge-msg.sh | 23 +++++++++
> > 6 files changed, 202 insertions(+), 78 deletions(-)
>
>
prev parent reply other threads:[~2020-03-06 11:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 17:48 [PATCH 0/1] gpg-interface: prefer check_signature() for GPG verification Hans Jerry Illikainen
2019-11-27 17:48 ` [PATCH 1/1] " Hans Jerry Illikainen
2019-11-30 21:57 ` Junio C Hamano
2020-03-04 11:48 ` [PATCH v1 0/2] " Hans Jerry Illikainen
2020-03-04 11:48 ` [PATCH v1 1/2] t: increase test coverage of signature verification output Hans Jerry Illikainen
2020-03-14 23:25 ` Johannes Schindelin
2020-03-15 16:40 ` Junio C Hamano
2020-03-04 11:48 ` [PATCH v1 2/2] gpg-interface: prefer check_signature() for GPG verification Hans Jerry Illikainen
2020-03-05 18:44 ` [PATCH v1 0/2] " Junio C Hamano
2020-03-06 11:59 ` Johannes Schindelin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.2003061257470.46@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hji@dyntopia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).