]> git.ipfire.org Git - thirdparty/git.git/commit - gpg-interface.c
gpg-interface: check good signature in a reliable way
authorMichael J Gruber <git@drmicha.warpmail.net>
Thu, 14 Feb 2013 16:04:42 +0000 (17:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Feb 2013 17:27:40 +0000 (09:27 -0800)
commitb60b7566c04e5f54c0e40229c1716d99d834ab68
tree4716daef7db8be4d742a6f98a31cbe37c78e7f55
parentd32805dce7bdc45a3e4045e999fc5d56e3b46a82
gpg-interface: check good signature in a reliable way

Currently, verify_signed_buffer() only checks the return code of gpg,
and some callers implement additional unreliable checks for "Good
signature" in the gpg output meant for the user.

Use the status output instead and parse for a line beinning with
"[GNUPG:] GOODSIG ". This is the only reliable way of checking for a
good gpg signature.

If needed we can change this easily to "[GNUPG:] VALIDSIG " if we want
to take into account the trust model.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gpg-interface.c