summaryrefslogtreecommitdiff
path: root/gpg-interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpg-interface.h')
-rw-r--r--gpg-interface.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/gpg-interface.h b/gpg-interface.h
index 80567e4894..b30cbdcd3d 100644
--- a/gpg-interface.h
+++ b/gpg-interface.h
@@ -15,9 +15,19 @@ enum signature_trust_level {
TRUST_ULTIMATE,
};
+enum payload_type {
+ SIGNATURE_PAYLOAD_UNDEFINED,
+ SIGNATURE_PAYLOAD_COMMIT,
+ SIGNATURE_PAYLOAD_TAG,
+ SIGNATURE_PAYLOAD_PUSH_CERT,
+};
+
struct signature_check {
char *payload;
- char *gpg_output;
+ size_t payload_len;
+ enum payload_type payload_type;
+ timestamp_t payload_timestamp;
+ char *output;
char *gpg_status;
/*
@@ -64,9 +74,14 @@ int sign_buffer(struct strbuf *buffer, struct strbuf *signature,
int git_gpg_config(const char *, const char *, void *);
void set_signing_key(const char *);
const char *get_signing_key(void);
-int check_signature(const char *payload, size_t plen,
- const char *signature, size_t slen,
- struct signature_check *sigc);
+
+/*
+ * Returns a textual unique representation of the signing key in use
+ * Either a GPG KeyID or a SSH Key Fingerprint
+ */
+const char *get_signing_key_id(void);
+int check_signature(struct signature_check *sigc,
+ const char *signature, size_t slen);
void print_signature_buffer(const struct signature_check *sigc,
unsigned flags);