From: Junio C Hamano <gitster@pobox.com>
To: "Michał Górny" <mgorny@gentoo.org>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
git@vger.kernel.org, Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH 2/2] t/t7510-signed-commit.sh: add signing subkey to Eris Discordia key
Date: Mon, 05 Nov 2018 10:08:33 +0900 [thread overview]
Message-ID: <xmqqo9b4l4a6.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <1541347654.22217.4.camel@gentoo.org> ("Michał Górny"'s message of "Sun, 04 Nov 2018 17:07:34 +0100")
Michał Górny <mgorny@gentoo.org> writes:
>> It's my understanding that GnuPG will use the most recent subkey
>> suitable for a particular purpose, and I think the test relies on that
>> behavior. However, I'm not sure that's documented. Do we want to rely
>> on that behavior or be more explicit? (This is a question, not an
>> opinion.)
>
> To be honest, I don't recall which suitable subkey is used. However, it
> definitely will prefer a subkey with signing capabilities over
> the primary key if one is present, and this is well-known and expected
> behavior.
>
> In fact, if you have a key with two signing subkeys A and B and it
> considers A better, then even if you explicitly pass keyid of B, it will
> use A. To force another subkey you have to append '!' to keyid.
>
> Therefore, I think this is a behavior we can rely on.
I didn't check how the signing key configuration is done in the test
sript (which is outside the patch context), but do you mean that we
create these signed objects by specifying which key to use with a
keyid with "!" appended? If so I agree that would make sense,
because we would then know which subkey should be used for signing
and checking with %GF/%GP would be a good way to do so.
Thanks.
next prev parent reply other threads:[~2018-11-05 1:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-04 9:47 [PATCH 1/2] t/t7510-signed-commit.sh: Add %GP to custom format checks Michał Górny
2018-11-04 9:47 ` [PATCH 2/2] t/t7510-signed-commit.sh: add signing subkey to Eris Discordia key Michał Górny
2018-11-04 15:10 ` brian m. carlson
2018-11-04 16:07 ` Michał Górny
2018-11-05 1:08 ` Junio C Hamano [this message]
2018-11-05 4:09 ` Michał Górny
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=xmqqo9b4l4a6.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mgorny@gentoo.org \
--cc=sandals@crustytoothpaste.net \
--cc=stolee@gmail.com \
/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).