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
This commit is contained in:
12
commit.h
12
commit.h
@ -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 */
|
||||
|
Reference in New Issue
Block a user