diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-08-14 15:31:13 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-15 13:23:20 -0700 |
commit | a50e7ca3215492b16d96221cf762dbe71ed99722 (patch) | |
tree | 4d9e15c3f2c9622121225361d19f773c0149c826 /gpg-interface.h | |
parent | c67072b90bdc56501483e0ba96d0d833e86362c3 (diff) | |
download | git-a50e7ca3215492b16d96221cf762dbe71ed99722.tar.gz |
gpg-interface: move parse_gpg_output() to where it should be
Earlier, ffb6d7d5 (Move commit GPG signature verification to
commit.c, 2013-03-31) moved this helper that used to be in pretty.c
(i.e. the output code path) to commit.c for better reusability.
It was a good first step in the right direction, but still suffers
from a myopic view that commits will be the only thing we would ever
want to sign---we would actually want to be able to reuse it even
wider.
The function interprets what GPG said; gpg-interface is obviously a
better place. Move it there.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gpg-interface.h')
-rw-r--r-- | gpg-interface.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gpg-interface.h b/gpg-interface.h index 37c23daff0..82493b780f 100644 --- a/gpg-interface.h +++ b/gpg-interface.h @@ -5,16 +5,22 @@ struct signature_check { char *payload; char *gpg_output; char *gpg_status; - char result; /* 0 (not checked), - * N (checked but no further result), - * U (untrusted good), - * G (good) - * B (bad) */ + + /* + * possible "result": + * 0 (not checked) + * N (checked but no further result) + * U (untrusted good) + * G (good) + * B (bad) + */ + char result; char *signer; char *key; }; extern void signature_check_clear(struct signature_check *sigc); +extern void parse_gpg_output(struct signature_check *); extern int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key); extern int verify_signed_buffer(const char *payload, size_t payload_size, const char *signature, size_t signature_size, struct strbuf *gpg_output, struct strbuf *gpg_status); extern int git_gpg_config(const char *, const char *, void *); |