X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=gpg-interface.h;h=80567e4894868d5d7a192cab0afb9ca9c09cb70d;hb=dcb11fc6225edbe2bd7af63eb550b739e7f4a074;hp=f4e9b4f3715a0b0d4be3ef526388bf6b87b56fda;hpb=24ecfdf206ee0e9e01f86d333d90d281fdfd12d0;p=thirdparty%2Fgit.git diff --git a/gpg-interface.h b/gpg-interface.h index f4e9b4f371..80567e4894 100644 --- a/gpg-interface.h +++ b/gpg-interface.h @@ -37,13 +37,20 @@ struct signature_check { void signature_check_clear(struct signature_check *sigc); +/* + * Look at a GPG signed tag object. If such a signature exists, store it in + * signature and the signed content in payload. Return 1 if a signature was + * found, and 0 otherwise. + */ +int parse_signature(const char *buf, size_t size, struct strbuf *payload, struct strbuf *signature); + /* * Look at GPG signed content (e.g. a signed tag object), whose * payload is followed by a detached signature on it. Return the * offset where the embedded detached signature begins, or the end of * the data when there is no such signature. */ -size_t parse_signature(const char *buf, size_t size); +size_t parse_signed_buffer(const char *buf, size_t size); /* * Create a detached signature for the contents of "buffer" and append