path: root/gpg-interface.h
diff options
authorJunio C Hamano <>2020-02-28 17:43:17 (GMT)
committerJunio C Hamano <>2020-02-28 17:43:17 (GMT)
commit0106b1d4be166fd4f7bcf0b901d50940c9f539e2 (patch)
treeced58695d6c423f4ae0db505d095dbd3463fe592 /gpg-interface.h
parent72b006f4bfd30b7c5037c163efaf279ab65bea9c (diff)
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.
Diffstat (limited to 'gpg-interface.h')
1 files changed, 9 insertions, 0 deletions
diff --git a/gpg-interface.h b/gpg-interface.h
index 93cc3af..3e624ec 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);