summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2010-11-10 11:17:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-11-10 17:40:35 (GMT)
commit3d5854e765dedfaf2a942e8fa1e950a40f9dcee3 (patch)
tree1156a1b70da302be54cf5c5c44003d461551ba1d /tag.c
parent81536b2dfae5a2839b6f20b22cc814a3690e4704 (diff)
downloadgit-3d5854e765dedfaf2a942e8fa1e950a40f9dcee3.zip
git-3d5854e765dedfaf2a942e8fa1e950a40f9dcee3.tar.gz
git-3d5854e765dedfaf2a942e8fa1e950a40f9dcee3.tar.bz2
tag: recognize rfc1991 signatures
We have always been creating rfc1991 signatures for users with "rfc1991" in their gpg config but failed to recognize them (tag -l -n largenumber) and verify them (tag -v, verify-tag). Make good use of the refactored signature detection and let us recognize and verify those signatures also. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tag.c b/tag.c
index d4f3080..f789744 100644
--- a/tag.c
+++ b/tag.c
@@ -5,6 +5,7 @@
#include "blob.h"
#define PGP_SIGNATURE "-----BEGIN PGP SIGNATURE-----"
+#define PGP_MESSAGE "-----BEGIN PGP MESSAGE-----"
const char *tag_type = "tag";
@@ -140,7 +141,8 @@ size_t parse_signature(const char *buf, unsigned long size)
{
char *eol;
size_t len = 0;
- while (len < size && prefixcmp(buf + len, PGP_SIGNATURE)) {
+ while (len < size && prefixcmp(buf + len, PGP_SIGNATURE) &&
+ prefixcmp(buf + len, PGP_MESSAGE)) {
eol = memchr(buf + len, '\n', size - len);
len += eol ? eol - (buf + len) + 1 : size - len;
}