Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Stelzer <fs@gigacodes.de>2021-12-09 11:52:46 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-10 00:38:04 +0300
commit4bbf3780ff2c485b1d0781d58b26e01f75dffcc1 (patch)
treed4fe77f9634a27f87c707cc4d6abb27e69b81ac6 /log-tree.c
parent6393c956f4e7061d6b19981bd8cd28ef037b911e (diff)
ssh signing: make git log verify key lifetime
Set the payload_type for check_signature() when calling git log. Implements the same tests as for verify-commit. Signed-off-by: Fabian Stelzer <fs@gigacodes.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/log-tree.c b/log-tree.c
index a46cf60e1e..d3e7a40b64 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -513,6 +513,7 @@ static void show_signature(struct rev_info *opt, struct commit *commit)
if (parse_signed_commit(commit, &payload, &signature, the_hash_algo) <= 0)
goto out;
+ sigc.payload_type = SIGNATURE_PAYLOAD_COMMIT;
sigc.payload = strbuf_detach(&payload, &sigc.payload_len);
status = check_signature(&sigc, signature.buf, signature.len);
if (status && !sigc.output)
@@ -583,6 +584,7 @@ static int show_one_mergetag(struct commit *commit,
status = -1;
if (parse_signature(extra->value, extra->len, &payload, &signature)) {
/* could have a good signature */
+ sigc.payload_type = SIGNATURE_PAYLOAD_TAG;
sigc.payload = strbuf_detach(&payload, &sigc.payload_len);
status = check_signature(&sigc, signature.buf, signature.len);
if (sigc.output)