Re: [PATCH 7/8] gpg-interface: introduce new signature format "X509" using gpgsm
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Jul 6, 2018, 01:10 UTC
- Message-ID
- <20180706011013.GB7697@genre.crustytoothpaste.net>
- In-Reply-To
- <1f99ef66bc5e115ec06a3c456658ad54ce405ce3.1530616446.git.henning.schild@siemens.com>
On Tue, Jul 03, 2018 at 02:38:19PM +0200, Henning Schild wrote:
Show 18 quoted lines
> This commit allows git to create and check X509 type signatures using > gpgsm. > > Signed-off-by: Henning Schild <henning.schild@siemens.com> > --- > Documentation/config.txt | 5 ++++- > gpg-interface.c | 10 +++++++++- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index c88903399..337df6e48 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -1828,9 +1828,12 @@ gpg.program:: > signed, and the program is expected to send the result to its > standard output. > > +gpg.programX509::
I'm not super excited about this name. It seems to indicate we want a level of hierarchy involved.
A hierarchy like sign.openpgp.program (falling back to gpg.program) and sign.x509.program might be more logical.
Show 18 quoted lines
> diff --git a/gpg-interface.c b/gpg-interface.c
> index aa747278e..85d721007 100644
> --- a/gpg-interface.c
> +++ b/gpg-interface.c
> @@ -16,13 +16,18 @@ struct gpg_format_data {
>
> #define PGP_SIGNATURE "-----BEGIN PGP SIGNATURE-----"
> #define PGP_MESSAGE "-----BEGIN PGP MESSAGE-----"
> +#define X509_SIGNATURE "-----BEGIN SIGNED MESSAGE-----"
>
> -enum gpgformats { PGP_FMT };
> +enum gpgformats { PGP_FMT, X509_FMT };
> struct gpg_format_data gpg_formats[] = {
> { .format = "PGP", .program = "gpg",
> .extra_args_verify = { "--keyid-format=long", },
> .sigs = { PGP_SIGNATURE, PGP_MESSAGE, },
> },
> + { .format = "X509", .program = "gpgsm",Similarly to my comment about "PGP", I think this would do well as "x509".
-- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204