Skip to content

Commit 4d34122

Browse files
committed
Merge branch 'jc/gpg-status'
"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
2 parents 6e8f3d1 + 4e5dc9c commit 4d34122

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gpg-interface.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,13 @@ int check_signature(const char *payload, size_t plen, const char *signature,
136136
sigc->gpg_output = strbuf_detach(&gpg_output, NULL);
137137
sigc->gpg_status = strbuf_detach(&gpg_status, NULL);
138138
parse_gpg_output(sigc);
139+
status |= sigc->result != 'G' && sigc->result != 'U';
139140

140141
out:
141142
strbuf_release(&gpg_status);
142143
strbuf_release(&gpg_output);
143144

144-
return sigc->result != 'G' && sigc->result != 'U';
145+
return !!status;
145146
}
146147

147148
void print_signature_buffer(const struct signature_check *sigc, unsigned flags)

0 commit comments

Comments
 (0)