Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jc/gpg-status'
author
Junio C Hamano
<gitster@pobox.com>
Mon, 20 Aug 2018 18:33:50 +0000
(11:33 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 20 Aug 2018 18:33:50 +0000
(11:33 -0700)
"git verify-tag" and "git verify-commit" have been taught to use
the exit status of underlying "gpg --verify" to signal bad or
untrusted signature they found.
* jc/gpg-status:
gpg-interface: propagate exit status from gpg back to the callers
gpg-interface.c
patch
|
blob
|
history
raw
(from parent 1:
6e8f3d1
)
diff --git
a/gpg-interface.c
b/gpg-interface.c
index bb8ea668b3719a2da1ec2b91c4095a58d957546c..db17d65f8ac977ddc5204130cb0af6a7565ae04b 100644
(file)
--- a/
gpg-interface.c
+++ b/
gpg-interface.c
@@
-136,12
+136,13
@@
int check_signature(const char *payload, size_t plen, const char *signature,
sigc->gpg_output = strbuf_detach(&gpg_output, NULL);
sigc->gpg_status = strbuf_detach(&gpg_status, NULL);
parse_gpg_output(sigc);
+ status |= sigc->result != 'G' && sigc->result != 'U';
out:
strbuf_release(&gpg_status);
strbuf_release(&gpg_output);
- return
sigc->result != 'G' && sigc->result != 'U'
;
+ return
!!status
;
}
void print_signature_buffer(const struct signature_check *sigc, unsigned flags)