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

Re: [PATCH] Make verify-tag a builtin.

From
CRCarlos Rica <jasampler@gmail.com>
Date
Jul 23, 2007, 21:21 UTC
Message-ID
<1b46aba20707231421k54ad2796i5c2f21cf11b4bea5@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0707230141080.14781@racer.site>
2007/7/23, Johannes Schindelin <Johannes.Schindelin@gmx.de>:
Show 21 quoted lines
> On Mon, 23 Jul 2007, Carlos Rica wrote:
> > +static int run_gpg_verify(const char *buf, unsigned long size, int verbose)
> > +{
> > +     struct child_process gpg;
> > +     const char *args_gpg[] = {"gpg", "--verify", "FILE", "-", NULL};
> > +     char *path, *eol;
> > +     size_t len;
> > +     int fd, ret;
> > +
> > +     path = xstrdup(git_path("VTAG_TMP"));
> > +     fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
> > +     if (fd < 0)
> > +             return error("could not create temporary file '%s': %s",
> > +                                             path, strerror(errno));
> > +     if (write_in_full(fd, buf, size) < 0)
> > +             return error("failed writing temporary file '%s': %s",
> > +                                             path, strerror(errno));
> > +     close(fd);
>
> I just tested something like "gpg --verify - - < <filename>" and it
> worked...

I couldn't verify tags using "gpg --verify - - <file" as you pointed in your response.

In my tests, it only allowed me to run:
"gpg --verify file.asc" or
"gpg --verify <file.asc" or
 "gpg --verify - <file.asc"
when file.asc was generated using the command "gpg --clearsign file",
in which it inserts a header:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
<empty-line>
I even tested to insert the header myself after creating a signed file
as git does:
   cp file otherfile
   gpg -bsa otherfile
   ...
   cat otherfile.asc >>otherfile
   ( echo -e "-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n" ; cat
otherfile ) \
     | gpg --verify
Note that sending them to "diff file.asc -" also shows different signatures,
but anyway it also says "gpg: BAD signature from ...", the same message as in:
   gpg --verify - - <otherfile
and different from the "gpg: Good signature from ..." when I run:
  gpg --verify file.asc
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 6 in “Make verify-tag a builtin.”
  1. Make verify-tag a builtin.Carlos Rica, Jul 23, 2007
  2. Johannes SchindelinJul 23, 2007
  3. Carlos RicaJul 23, 2007
  4. Johannes SchindelinJul 23, 2007
  5. Carlos RicaJul 23, 2007
  6. Johannes SchindelinJul 23, 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.