summaryrefslogtreecommitdiff
path: root/gpg-interface.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-28 09:43:17 -0800
committerJunio C Hamano <gitster@pobox.com>2020-02-28 09:43:17 -0800
commit0106b1d4be166fd4f7bcf0b901d50940c9f539e2 (patch)
treeced58695d6c423f4ae0db505d095dbd3463fe592 /gpg-interface.h
parent72b006f4bfd30b7c5037c163efaf279ab65bea9c (diff)
downloadgit-0106b1d4be166fd4f7bcf0b901d50940c9f539e2.tar.gz
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')
-rw-r--r--gpg-interface.h9
1 files changed, 9 insertions, 0 deletions
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);