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

Re: [RFE] Signing using SSL

From
Fabian Stelzer <fs@gigacodes.de>
Date
Mar 16, 2022, 16:27 UTC
Message-ID
<20220316162711.wfcavqpg2w4u7fat@fs>
In-Reply-To
<036701d83942$e6963ca0$b3c2b5e0$@nexbridge.com>
On 16.03.2022 10:34, rsbecker@nexbridge.com wrote:
Show 33 quoted lines
>Following up on our IRC discussion on Monday, I have had a request to
>support signing git commits and tags with SSL certificates instead of
>SSH/GPG. The organization is heavily invested in SSL infrastructure, so they
>want to go down that path.
>
>The basic technique for doing this is, for example:
>
>openssl dgst -sha256 -sign key -out content.sha256 signature.txt -passin
>passphrase
>
>There is a pre-step to compute the sha256, in this example, into a file
>provided to openssl. We could use openssl to compute the hash also.
>
>Verification is a bit different than what SSH or GPG does:
>
>openssl dgst -sha256 -verify  <(openssl x509 -in certificate -pubkey -noout)
>-signature sign.txt.sha256 signature.txt
>
>and reports either
>
>Verified OK
>Or
>Verification Failure
>
>It does not look like completion codes are consistently involved.
>
>This also does look structurally different than both GPG and SSH and more
>work to set up. It may be possible to provide wrappers and pretend we are in
>SSH, but I'm not sure that is the right path to take.
>
>Any pointers on how this might be done in existing git infrastructure, or
>should I look into making this work in code? Sorry to say that the
>documentation is not that clear on this.

Why not gpgsm? It can deal with x509 certs and is already supported. I am using this to do s/mime signing/encryption with an yubikey hardware token but static certs/keys should be even simpler. However I'm not sure how good this works on other platforms.

Take a look into the GPGSM prereq in t/lib-gpg.sh for a few hints on how to set this up.

Previous: rsbecker@nexbridge.comNext: rsbecker@nexbridge.com
Message 3 of 7 in “[RFE] Signing using SSL”
  1. rsbecker@nexbridge.comMar 16, 2022
  2. rsbecker@nexbridge.comMar 16, 2022
  3. Fabian StelzerMar 16, 2022
  4. rsbecker@nexbridge.comMar 16, 2022
  5. rsbecker@nexbridge.comMar 29, 2022
  6. 'Fabian Stelzer'Mar 29, 2022
  7. rsbecker@nexbridge.comMar 29, 2022

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.