summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-12-21 15:03:15 -0800
committerJunio C Hamano <gitster@pobox.com>2021-12-21 15:03:15 -0800
commitd2f0b7275998ebeaa15e48ce0180c466e1d77ec4 (patch)
tree9c78f0d3b6d3ba03fc9e6466f1f56fdc31443fcf /log-tree.c
parent3770c21be99a1e387794ec21e9bfeb3c640376b6 (diff)
parent50992f96c546ebdc0c149660f6baa948739888d9 (diff)
Merge branch 'fs/ssh-signing-key-lifetime'
Extend the signing of objects with SSH keys and learn to pay attention to the key validity time range when verifying. * fs/ssh-signing-key-lifetime: ssh signing: verify ssh-keygen in test prereq ssh signing: make fmt-merge-msg consider key lifetime ssh signing: make verify-tag consider key lifetime ssh signing: make git log verify key lifetime ssh signing: make verify-commit consider key lifetime ssh signing: add key lifetime test prereqs ssh signing: use sigc struct to pass payload t/fmt-merge-msg: make gpgssh tests more specific t/fmt-merge-msg: do not redirect stderr
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/log-tree.c b/log-tree.c
index 644893fd8c..d3e7a40b64 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -513,8 +513,9 @@ static void show_signature(struct rev_info *opt, struct commit *commit)
if (parse_signed_commit(commit, &payload, &signature, the_hash_algo) <= 0)
goto out;
- status = check_signature(payload.buf, payload.len, signature.buf,
- signature.len, &sigc);
+ 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)
show_sig_lines(opt, status, "No signature\n");
else
@@ -583,8 +584,9 @@ static int show_one_mergetag(struct commit *commit,
status = -1;
if (parse_signature(extra->value, extra->len, &payload, &signature)) {
/* could have a good signature */
- status = check_signature(payload.buf, payload.len,
- signature.buf, signature.len, &sigc);
+ 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)
strbuf_addstr(&verify_message, sigc.output);
else