gpg: centralize signature check
verify-commit and verify-tag both share a central codepath for verifying commits: check_signature. However, verify-tag exited successfully for untrusted signature, while verify-commit exited unsuccessfully. Centralize this signature check and make verify-commit adopt the older verify-tag behavior. This behavior is more logical anyway, as the signature is in fact valid, whether or not there's a path of trust to the author. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
8e98e5f27a
commit
434060ec6d
2
commit.h
2
commit.h
@ -375,7 +375,7 @@ extern void print_commit_list(struct commit_list *list,
|
||||
* at all. This may allocate memory for sig->gpg_output, sig->gpg_status,
|
||||
* sig->signer and sig->key.
|
||||
*/
|
||||
extern void check_commit_signature(const struct commit *commit, struct signature_check *sigc);
|
||||
extern int check_commit_signature(const struct commit *commit, struct signature_check *sigc);
|
||||
|
||||
int compare_commits_by_commit_date(const void *a_, const void *b_, void *unused);
|
||||
|
||||
|
Reference in New Issue
Block a user