From: Hans Jerry Illikainen <hji@dyntopia.com>
To: git@vger.kernel.org
Cc: Hans Jerry Illikainen <hji@dyntopia.com>
Subject: [PATCH 0/5] refactor gpg-interface and add gpg verification for clones
Date: Sun, 5 Jan 2020 13:56:11 +0000 [thread overview]
Message-ID: <20200105135616.19102-1-hji@dyntopia.com> (raw)
This series starts off with refactor of print_signature_buffer() to make
all output conditional based on the 'flags' parameter. The print
function is also extended to optionally show one-line summaries of
signature verifications (previously that functionality existed in
verify_merge_signature()).
The helper functions for signature verification of commits are then
refactored. The new gpg_verify_commit() function is modelled after
gpg_verify_tag(). This allows us to remove verify_merge_signature() and
the file-local run_gpg_verify() (from the verify-commit builtin). It
also allows us to change check_commit_signature() into a local function
in commit.c.
A new configuration option is also introduced, gpg.verifySignatures.
This allows users to enable signature verification for all operations
that support it. Individual operations can then use
<operation>.verifySignatures for finer-grained control.
And finally, signature verification is added to the clone builtin. It
obeys --(no-)verify-signatures, clone.verifySignatures and
gpg.verifySignatures (in decreasing order of significance).
A notable quirk with signature verification for clones is
--recurse-submodules. As mentioned in the commit message, the current
workaround is to disable signature verification for submodules by
passing --no-verify-signatures in submodule--helper.c
I'm very much open to suggestions for a better approach of dealing with
recursive clones. However, I don't think --verify-signatures from the
clone builtin should propagate to submodules, because that would break a
workflow where a user:
1. trust the hash function
2. has audited an unsigned repository at a given point
3. has added the repository at that point as a submodule
4. has signed an object in the super repository where the audited
submodule is referenced
So, I think it'd make more sense to introduce a
submodule.verifySignatures config knob to be used by both
--recurse-submodules and when the 'submodule' command is used directly.
I hope this patch series isn't too confusing/all over the place. I
wasn't sure whether the preparatory patches would have made sense in
isolation, so I opted to send it all in one go.
Hans Jerry Illikainen (5):
gpg-interface: conditionally show the result in
print_signature_buffer()
gpg-interface: support one-line summaries in print_signature_buffer()
commit: refactor signature verification helpers
merge: verify signatures if gpg.verifySignatures is true
clone: support signature verification
Documentation/config.txt | 2 +
Documentation/config/clone.txt | 3 +
Documentation/config/gpg.txt | 6 +
Documentation/config/merge.txt | 4 +-
Documentation/git-clone.txt | 4 +
builtin/clone.c | 46 ++++
builtin/merge.c | 22 +-
builtin/pull.c | 18 +-
builtin/submodule--helper.c | 6 +
builtin/tag.c | 4 +-
builtin/verify-commit.c | 26 +-
builtin/verify-tag.c | 4 +-
commit.c | 58 ++--
commit.h | 31 +--
gpg-interface.c | 43 ++-
gpg-interface.h | 11 +-
pretty.c | 3 +-
t/t5619-clone-verify-signatures.sh | 411 +++++++++++++++++++++++++++++
t/t7612-merge-verify-signatures.sh | 27 ++
tag.c | 19 +-
20 files changed, 633 insertions(+), 115 deletions(-)
create mode 100644 Documentation/config/clone.txt
create mode 100755 t/t5619-clone-verify-signatures.sh
--
2.25.0.rc1.302.gc71d20beed
next reply other threads:[~2020-01-05 13:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-05 13:56 Hans Jerry Illikainen [this message]
2020-01-05 13:56 ` [PATCH 1/5] gpg-interface: conditionally show the result in print_signature_buffer() Hans Jerry Illikainen
2020-01-06 19:07 ` Junio C Hamano
2020-01-05 13:56 ` [PATCH 2/5] gpg-interface: support one-line summaries " Hans Jerry Illikainen
2020-01-06 19:33 ` Junio C Hamano
2020-01-05 13:56 ` [PATCH 3/5] commit: refactor signature verification helpers Hans Jerry Illikainen
2020-01-06 19:36 ` Junio C Hamano
2020-01-05 13:56 ` [PATCH 4/5] merge: verify signatures if gpg.verifySignatures is true Hans Jerry Illikainen
2020-01-06 21:01 ` Junio C Hamano
2020-01-05 13:56 ` [PATCH 5/5] clone: support signature verification Hans Jerry Illikainen
2020-01-05 23:11 ` [PATCH 0/5] refactor gpg-interface and add gpg verification for clones Junio C Hamano
2020-01-07 4:06 ` Hans Jerry Illikainen
2020-01-07 16:54 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200105135616.19102-1-hji@dyntopia.com \
--to=hji@dyntopia.com \
--cc=git@vger.kernel.org \
/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).