git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Gwyneth Morgan <gwymor@tilde.club>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] signature-format.txt: note SSH and X.509 signature delimiters
Date: Fri, 10 Feb 2023 11:25:30 -0800	[thread overview]
Message-ID: <xmqqfsbdiaqd.fsf@gitster.g> (raw)
In-Reply-To: <20230210061611.124932-1-gwymor@tilde.club> (Gwyneth Morgan's message of "Fri, 10 Feb 2023 06:16:11 +0000")

Gwyneth Morgan <gwymor@tilde.club> writes:

> This document only explained PGP signatures, but Git now supports X.509
> and SSH signatures.
>
> Signed-off-by: Gwyneth Morgan <gwymor@tilde.club>
> ---
>  Documentation/gitformat-signature.txt | 26 ++++++++++++++++++++------
>  1 file changed, 20 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/gitformat-signature.txt b/Documentation/gitformat-signature.txt
> index d8e3eb1bac..5f0c9202e3 100644
> --- a/Documentation/gitformat-signature.txt
> +++ b/Documentation/gitformat-signature.txt
> @@ -17,12 +17,26 @@ DESCRIPTION
>  Git uses cryptographic signatures in various places, currently objects (tags,
>  commits, mergetags) and transactions (pushes). In every case, the command which
>  is about to create an object or transaction determines a payload from that,
> +calls an external program to obtain a detached signature for the payload
> +(`gpg -bsa` in the case of PGP signatures), and embeds the signature into the
> +object or transaction.
> +
> +Signatures begin with an ASCII Armor header line and end with a tail line,
> +which differ depending on signature type.

OK, we used to say "begin with <<something PGP>>" that was not
generic, so we borrow the "ascii armor header/tail line" term the
crypto folks use.  Then ...

> +PGP::
> +	Signatures begin with `-----BEGIN PGP SIGNATURE-----` and end
> +	with `-----END PGP SIGNATURE-----`, unless gpg is told to

... it may be easier to understand if the paragraph somehow made it
clear that "ascii armore header" is "-----BEGIN PGP SIGNATURE-----"
and "tail" is "---END PGP SIGNATURE-----" for the format being
described.

Alternatively, if we are going to repeat "... begin with X, and end
with Y" for each format, then we may not even need to have the
previous paragraph that says these formats follow the same pattern
(i.e. header then contents then tail, but header and tail are
different depending on the format).

> +	produce RFC1991 signatures which use `MESSAGE` instead of
> +	`SIGNATURE`.
> +
> +SSH::
> +	Signatures begin with `-----BEGIN SSH SIGNATURE-----` and end
> +	with `-----END SSH SIGNATURE-----`.
> +
> +X.509::
> +	Signatures begin with `-----BEGIN SIGNED MESSAGE-----` and end
> +	with `-----END SIGNED MESSAGE-----`.

  parent reply	other threads:[~2023-02-10 19:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20  5:32 [PATCH] signature-format.txt: Note SSH and X.509 signature delimiters Gwyneth Morgan
2022-01-20 19:30 ` Junio C Hamano
2022-01-20 19:49   ` Junio C Hamano
2023-02-10  6:16   ` Gwyneth Morgan
2023-02-10 16:58     ` Junio C Hamano
2023-02-10  6:16 ` [PATCH v2] signature-format.txt: note " Gwyneth Morgan
2023-02-10 10:52   ` Ævar Arnfjörð Bjarmason
2023-02-27 20:26     ` Gwyneth Morgan
2023-02-10 19:25   ` Junio C Hamano [this message]
2023-02-27 20:27   ` [PATCH v3] " Gwyneth Morgan
2023-02-27 21:44     ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqfsbdiaqd.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gwymor@tilde.club \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).