Re: [PATCH 1/1] gpg-interface: prefer check_signature() for GPG verification
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 30, 2019, 21:57 UTC
- Message-ID
- <xmqqo8wt10yl.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20191127174821.5830-2-hji@dyntopia.com>
Hans Jerry Illikainen <hji@dyntopia.com> writes:
Show 9 quoted lines
> This commit refactors the use of verify_signed_buffer() outside of > gpg-interface.c to use check_signature() instead. It also turns > verify_signed_buffer() into a file-local function since it's now only > invoked internally by check_signature(). > > There were previously two globally scoped functions used in different > parts of Git to perform GPG signature verification: > verify_signed_buffer() and check_signature(). Now only > check_signature() is used.
OK. I wondered why the former does not get removed, but if the latter uses it as its implementation detail, then it is expected that it has to remain. So check_signature() allows it to make a minimum sanity check, but it does its own verification based on the status output, and both have to pass for a signature to be valid? Which makes sense to me.
Show 5 quoted lines
> Now all operations that does signature verification share a single entry > point to gpg-interface.c. This makes it easier to propagate changed or > additional functionality in GPG signature verification to all parts of > Git, without having odd edge-cases that don't perform the same degree of > verification.
Makes sense.