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

Re: [PATCH] ssh signing: better error message when key not in agent

From
Adam Szkoda <adaszko@gmail.com>
Date
Jan 18, 2023, 15:28 UTC
Message-ID
<CAEroKagqxC86X0SD8=tK0w+yXL7QecZ+z_7sja-K6ajs0=Z=BQ@mail.gmail.com>
In-Reply-To
<8025d5c7-ab55-c533-1997-05b4c7339d61@dunelm.org.uk>
Hi Phillip,

Good point! My first thought is to try doing a stat() syscall on the path from 'user.signingKey' to see if it exists and if not, treat it as a public key (and pass the -U option). If that sounds reasonable, I can update the patch.

Best — Adam

On Wed, Jan 18, 2023 at 3:34 PM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 24 quoted lines
>
> On 18/01/2023 11:10, Phillip Wood wrote:
> >> the agent [1].  A fix is scheduled to be released in OpenSSH 9.1. All
> >> that
> >> needs to be done is to pass an additional backward-compatible option
> >> -U to
> >> 'ssh-keygen -Y sign' call.  With '-U', ssh-keygen always interprets
> >> the file
> >> as public key and expects to find the private key in the agent.
> >
> > The documentation for user.signingKey says
> >
> >   If gpg.format is set to ssh this can contain the path to either your
> > private ssh key or the public key when ssh-agent is used.
> >
> > If I've understood correctly passing -U will prevent users from setting
> > this to a private key.
>
> If there is an easy way to tell if the user has given us a public key
> then we could pass "-U" in that case.
>
> Best Wishes
>
> Phillip
Previous: Phillip WoodNext: Phillip Wood
Message 4 of 18 in “ssh signing: better error message when key not in agent”
  1. ssh signing: better error message when key not in agentAdam Szkoda via GitGitGadget, Jan 18, 2023
  2. Phillip WoodJan 18, 2023
  3. Phillip WoodJan 18, 2023
  4. Adam SzkodaJan 18, 2023
  5. Phillip WoodJan 18, 2023
  6. Fabian StelzerJan 20, 2023
  7. Phillip WoodJan 23, 2023
  8. Fabian StelzerJan 23, 2023
  9. Adam SzkodaJan 23, 2023
  10. ssh signing: better error message when key not in agentAdam Szkoda via GitGitGadget, Jan 24, 2023
  11. Junio C HamanoJan 24, 2023
  12. Adam SzkodaJan 25, 2023
  13. Junio C HamanoJan 25, 2023
  14. Junio C HamanoJan 25, 2023
  15. Eric SunshineJan 25, 2023
  16. Junio C HamanoJan 25, 2023
  17. Eric SunshineFeb 15, 2023
  18. ssh signing: better error message when key not in agentAdam Szkoda via GitGitGadget, Jan 25, 2023

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.