diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-02-22 16:12:42 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-22 16:12:42 -0800 |
commit | 15af6e6fee54632358798bef548d89dd3764805d (patch) | |
tree | f4464996780c0c94bd0901bab9e161b9679fe05f /commit.h | |
parent | b9554c03a0a8147109608b94feb32837a6e6a145 (diff) | |
parent | 9b27b49240f6bf760ff58d917491bec0981aaf9f (diff) | |
download | git-15af6e6fee54632358798bef548d89dd3764805d.tar.gz |
Merge branch 'bc/signed-objects-with-both-hashes'
Signed commits and tags now allow verification of objects, whose
two object names (one in SHA-1, the other in SHA-256) are both
signed.
* bc/signed-objects-with-both-hashes:
gpg-interface: remove other signature headers before verifying
ref-filter: hoist signature parsing
commit: allow parsing arbitrary buffers with headers
gpg-interface: improve interface for parsing tags
commit: ignore additional signatures when parsing signed commits
ref-filter: switch some uses of unsigned long to size_t
Diffstat (limited to 'commit.h')
-rw-r--r-- | commit.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -319,7 +319,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); /* @@ -361,4 +362,13 @@ int compare_commits_by_gen_then_commit_date(const void *a_, const void *b_, void LAST_ARG_MUST_BE_NULL int run_commit_hook(int editor_is_used, const char *index_file, const char *name, ...); +/* Sign a commit or tag buffer, storing the result in a header. */ +int sign_with_header(struct strbuf *buf, const char *keyid); +/* Parse the signature out of a header. */ +int parse_buffer_signed_by_header(const char *buffer, + unsigned long size, + struct strbuf *payload, + struct strbuf *signature, + const struct git_hash_algo *algop); + #endif /* COMMIT_H */ |