Skip to content

X509 (gpgsm) commit signing support

Henning Schild git 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 7 repliesIn review
  2. v37 patches 11 repliesSuperseded
  3. v29 patches 47 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches27 repliesSuperseded

Changes in v4 from the cover letter

- make gpg.format matching case sensitive
- (final?) coding style and wording changes

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7gpg-interface: add new config to select how to sign a commitDocumentation/config.txt gpg-interface.c+14 -00 replies
2/7t/t7510: check the validation of the new config gpg.formatt/t7510-signed-commit.sh+9 -03 replies
3/7gpg-interface: introduce an abstraction for multiple gpg formatsgpg-interface.c+67 -211 reply
4/7gpg-interface: do not hardcode the key string len anymoregpg-interface.c+4 -31 reply
5/7gpg-interface: introduce new config to select per gpg format programDocumentation/config.txt gpg-interface.c+6 -10 replies
6/7gpg-interface: introduce new signature format "x509" using gpgsmDocumentation/config.txt gpg-interface.c+18 -20 replies
7/7gpg-interface t: extend the existing GPG tests with GPGSMt/lib-gpg.sh t/lib-gpg/gpgsm-gen-key.in t/lib-gpg/gpgsm_cert.p12 +4 more+172 -111 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/7] X509 (gpgsm) commit signing support

Changes in v4:
- make gpg.format matching case sensitive
- (final?) coding style and wording changes

Changes in v3:
- drop patches 1 and 2 known from < v3, see pu hs/push-cert-check-cleanup
- dropped some testcases from p6, added two t7004 bad key/sig
- ship a binary x509 certificate for tests, no generation anymore
- silence gpgsm in tests
- switch all tests to use test_config instead of "git config"
- p4 deal with invalid input
- p3 several refactorings, see "PATCH v2 5/9" discussion

Changes in v2:
- removed trailing commas in array initializers and add leading space
- replaced assert(0) with BUG in p5
- consolidated 2 format lookups reusing get_format_data p5
- changed from format "PGP" to "openpgp", later X509 to "x509"
- use strcasecmp instead of strcmp for format matching
- introduce gpg.<format>.program in p8, no gpg.programX509 anymore
- moved t/7510 patch inbetween the two patches changing validation code
- changed t/7510 patch to use test_config and test_must_fail

This series adds support for signing commits with gpgsm.

The first 5 patches prepare for the introduction of the actual feature in patch 6.
Finally patch 7 extends the testsuite to cover the new feature.

This series can be seen as a follow up of a series that appeared under the name "gpg-interface: Multiple signing tools" in april 2018 [1]. After that series was not merged i decided to get my patches ready. The original series aimed at being generic for any sort of signing tool, while this series just introduced the X509 variant of gpg. (gpgsm)
I collected authors and reviewers of that first series and already put them on cc.

[1] https://public-inbox.org/git/[email protected]/

Henning Schild (7):
gpg-interface: add new config to select how to sign a commit t/t7510: check the validation of the new config gpg.format
gpg-interface: introduce an abstraction for multiple gpg formats
gpg-interface: do not hardcode the key string len anymore
gpg-interface: introduce new config to select per gpg format program
gpg-interface: introduce new signature format "x509" using gpgsm gpg-interface t: extend the existing GPG tests with GPGSM

 Documentation/config.txt   |  10 +++++
 gpg-interface.c            | 108 +++++++++++++++++++++++++++++++++++++--------
 t/lib-gpg.sh               |  28 +++++++++++-
 t/lib-gpg/gpgsm-gen-key.in |   8 ++++
 t/lib-gpg/gpgsm_cert.p12   | Bin 0 -> 2652 bytes
 t/t4202-log.sh             |  39 ++++++++++++++++
 t/t5534-push-signed.sh     |  52 ++++++++++++++++++++++
 t/t7004-tag.sh             |  13 ++++++
 t/t7030-verify-tag.sh      |  33 ++++++++++++++
 t/t7510-signed-commit.sh   |   9 ++++
 10 files changed, 281 insertions(+), 19 deletions(-)
 create mode 100644 t/lib-gpg/gpgsm-gen-key.in
 create mode 100644 t/lib-gpg/gpgsm_cert.p12
Signature · 1 line
2.16.4