git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] verify-tag: also grok CR/LFs in the tag signature

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 3, 2007, 16:51 UTC
Message-ID
<Pine.LNX.4.64.0709031749110.28586@racer.site>

On some people's favorite platform, gpg outputs signatures with CR/LF line endings. So verify-tag has to play nice with them.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	I just pushed a fix to 4msysgit.git which prevents the generation 
	of such tag signatures, but it's always better to be a little more 
	graceful.
	Note that the match less strict than before, but if you really 
	have to start a line in a signed tag with that magic BEGIN 
	PGP SIGNATURE string, you cannot be helped anyway.
 builtin-verify-tag.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-verify-tag.c b/builtin-verify-tag.c
index 5c1314d..8cfefcf 100644
--- a/builtin-verify-tag.c
+++ b/builtin-verify-tag.c
@@ -35,7 +35,7 @@ static int run_gpg_verify(const char *buf, unsigned long size, int verbose)
 
 	/* find the length without signature */
 	len = 0;
-	while (len < size && prefixcmp(buf + len, PGP_SIGNATURE "\n")) {
+	while (len < size && prefixcmp(buf + len, PGP_SIGNATURE)) {
 		eol = memchr(buf + len, '\n', size - len);
 		len += eol ? eol - (buf + len) + 1 : size - len;
 	}
-- 
1.5.3.2.g46909
Message 1 of 1 in “verify-tag: also grok CR/LFs in the tag signature”
  1. verify-tag: also grok CR/LFs in the tag signatureJohannes Schindelin, Sep 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.