summaryrefslogtreecommitdiffstats
path: root/log-tree.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2021-01-19 00:49:11 +0100
committerJunio C Hamano <gitster@pobox.com>2021-01-19 02:38:20 +0100
commit1fb5cf0da657ef046c4eb4d0de6f2defb2fb09c6 (patch)
tree345b28b8ed678c73cc97d7438707b05d6f327ea5 /log-tree.c
parentref-filter: switch some uses of unsigned long to size_t (diff)
downloadgit-1fb5cf0da657ef046c4eb4d0de6f2defb2fb09c6.tar.xz
git-1fb5cf0da657ef046c4eb4d0de6f2defb2fb09c6.zip
commit: ignore additional signatures when parsing signed commits
When we create a commit with multiple signatures, neither of these signatures includes the other. Consequently, when we produce the payload which has been signed so we can verify the commit, we must strip off any other signatures, or the payload will differ from what was signed. Do so, and in preparation for verifying with multiple algorithms, pass the algorithm we want to verify into parse_signed_commit. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/log-tree.c b/log-tree.c
index fd0dde97ec..7e0335e548 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -502,7 +502,7 @@ static void show_signature(struct rev_info *opt, struct commit *commit)
struct signature_check sigc = { 0 };
int status;
- if (parse_signed_commit(commit, &payload, &signature) <= 0)
+ if (parse_signed_commit(commit, &payload, &signature, the_hash_algo) <= 0)
goto out;
status = check_signature(payload.buf, payload.len, signature.buf,