git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabian Stelzer <fs@gigacodes.de>
To: phillip.wood@dunelm.org.uk
Cc: Phillip Wood via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH v2] ssh signing: return an error when signature cannot be read
Date: Thu, 6 Oct 2022 16:19:24 +0200	[thread overview]
Message-ID: <20221006141924.7rxj3ntq24hynj5t@fs> (raw)
In-Reply-To: <ce32d5c7-c62c-b27f-23fa-566cba65c383@dunelm.org.uk>

On 06.10.2022 14:05, Phillip Wood wrote:
>Hi Fabian
>
>On 06/10/2022 09:28, Fabian Stelzer wrote:
>>On 04.10.2022 10:01, Phillip Wood via GitGitGadget wrote:
>>>From: Phillip Wood <phillip.wood@dunelm.org.uk>
>>>   This patch is based on maint. In the longer term the code could be
>>>   simplified by using pipes rather than tempfiles as we do for gpg.
>>>   ssh-keygen has supported reading the data to be signed from stdin and
>>>   writing the signature to stdout since it introduced signing.
>>
>>The ssh-keygen call is already using stdin for the content to sign 
>>or verify. The signature and the signing key need to be files passed 
>>as parameters to ssh-keygen. I'm not aware of any other option of 
>>providing them to it.
>
>We use stdin for the content when verifying but not when signing
>
>	strvec_pushl(&signer.args, use_format->program,
>		     "-Y", "sign",
>		     "-n", "git",
>		     "-f", ssh_signing_key_file,
>		     buffer_file->filename.buf,
>		     NULL);
>
>	sigchain_push(SIGPIPE, SIG_IGN);
>	ret = pipe_command(&signer, NULL, 0, NULL, 0, &signer_stderr, 0);
>	sigchain_pop(SIGPIPE);
>
>Note that when verifying with -Y check-novalidate there is a missing 
>call to sigchain_push(SIGPIPE, SIG_IGN) as we are passing data over 
>stdin so need to ignore SIGPIPE.
>

Hm, true. I was kinda sure it both used stdin/out. I'm short on time at the 
moment and can't really work on git stuff. But I hope i can at the end of 
the year. There's a few more todos on my list.

Cheers,
Fabian


      reply	other threads:[~2022-10-06 14:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03  9:24 [PATCH] ssh signing: return an error when signature cannot be read Phillip Wood via GitGitGadget
2022-10-03 16:13 ` Junio C Hamano
2022-10-04 10:01 ` [PATCH v2] " Phillip Wood via GitGitGadget
2022-10-06  8:28   ` Fabian Stelzer
2022-10-06 13:05     ` Phillip Wood
2022-10-06 14:19       ` Fabian Stelzer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221006141924.7rxj3ntq24hynj5t@fs \
    --to=fs@gigacodes.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).