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

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2021-01-19 02:49:11 +0300
committerJunio C Hamano <gitster@pobox.com>2021-01-19 04:38:20 +0300
commit1fb5cf0da657ef046c4eb4d0de6f2defb2fb09c6 (patch)
tree345b28b8ed678c73cc97d7438707b05d6f327ea5 /commit.h
parent83dff3eb2ed9cd750ec89f3dc5bab44b16119743 (diff)
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 'commit.h')
-rw-r--r--commit.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/commit.h b/commit.h
index f4e7b0158e2..030aa65ab87 100644
--- a/commit.h
+++ b/commit.h
@@ -317,7 +317,8 @@ void set_merge_remote_desc(struct commit *commit,
struct commit *get_merge_parent(const char *name);
int parse_signed_commit(const struct commit *commit,
- struct strbuf *message, struct strbuf *signature);
+ struct strbuf *message, struct strbuf *signature,
+ const struct git_hash_algo *algop);
int remove_signature(struct strbuf *buf);
/*