summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-12-21 15:03:15 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-12-21 15:03:15 -0800
commitd2f0b7275998ebeaa15e48ce0180c466e1d77ec4 (patch)
tree9c78f0d3b6d3ba03fc9e6466f1f56fdc31443fcf /builtin/receive-pack.c
parentMerge branch 'jc/grep-patterntype-default-doc' (diff)
parentssh signing: verify ssh-keygen in test prereq (diff)
downloadtgif-d2f0b7275998ebeaa15e48ce0180c466e1d77ec4.tar.xz
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 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 313b372a11..07a3053c1d 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -769,8 +769,10 @@ static void prepare_push_cert_sha1(struct child_process *proc)
memset(&sigcheck, '\0', sizeof(sigcheck));
bogs = parse_signed_buffer(push_cert.buf, push_cert.len);
- check_signature(push_cert.buf, bogs, push_cert.buf + bogs,
- push_cert.len - bogs, &sigcheck);
+ sigcheck.payload = xmemdupz(push_cert.buf, bogs);
+ sigcheck.payload_len = bogs;
+ check_signature(&sigcheck, push_cert.buf + bogs,
+ push_cert.len - bogs);
nonce_status = check_nonce(push_cert.buf, bogs);
}