From 0106b1d4be166fd4f7bcf0b901d50940c9f539e2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 28 Feb 2020 09:43:17 -0800 Subject: Revert "gpg-interface: prefer check_signature() for GPG verification" This reverts commit 72b006f4bfd30b7c5037c163efaf279ab65bea9c, which breaks the end-user experience when merging a signed tag without having the public key. We should report "can't check because we have no public key", but the code with this change claimed that there was no signature. --- gpg-interface.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gpg-interface.h') diff --git a/gpg-interface.h b/gpg-interface.h index 93cc3aff5c..3e624ec289 100644 --- a/gpg-interface.h +++ b/gpg-interface.h @@ -46,6 +46,15 @@ size_t parse_signature(const char *buf, size_t size); int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key); +/* + * Run "gpg" to see if the payload matches the detached signature. + * gpg_output, when set, receives the diagnostic output from GPG. + * gpg_status, when set, receives the status output from GPG. + */ +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); + int git_gpg_config(const char *, const char *, void *); void set_signing_key(const char *); const char *get_signing_key(void); -- cgit v1.3