Skip to content

ssh signing: verify key lifetime

Fabian Stelzer git 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest9 patches 0 repliesNew
  2. v58 patches 2 repliesSuperseded
  3. v47 patches 8 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v37 patches1 replySuperseded
v26 patches7 repliesSuperseded
v16 patches7 repliesSuperseded

Changes in v6 from the cover letter

- moved the fixes to existing test to the first two commits and merged those fixing new tests into the corresponding commit

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9t/fmt-merge-msg: do not redirect stderrt/t6200-fmt-merge-msg.sh+4 -40 replies
2/9t/fmt-merge-msg: make gpgssh tests more specifict/t6200-fmt-merge-msg.sh+2 -00 replies
3/9ssh signing: use sigc struct to pass payloadbuiltin/receive-pack.c commit.c fmt-merge-msg.c +4 more+35 -350 replies
4/9ssh signing: add key lifetime test prereqst/lib-gpg.sh+18 -10 replies
5/9ssh signing: make verify-commit consider key lifetimeDocumentation/config/gpg.txt commit.c gpg-interface.c +2 more+110 -00 replies
6/9ssh signing: make git log verify key lifetimelog-tree.c t/t4202-log.sh+45 -00 replies
7/9ssh signing: make verify-tag consider key lifetimet/t7031-verify-tag-signed-ssh.sh tag.c+43 -00 replies
8/9ssh signing: make fmt-merge-msg consider key lifetimefmt-merge-msg.c t/t6200-fmt-merge-msg.sh+59 -00 replies
9/9ssh signing: verify ssh-keygen in test prereqt/lib-gpg.sh+40 -130 replies

Reviews trailers per patch

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

Read the v6 thread

Cover letter [PATCH v6 0/9] ssh signing: verify key lifetime

changes since v5:
- moved the fixes to existing test to the first two commits and merged those fixing new tests into the corresponding commit

changes since v4:
- removed unneccessary io redir in merge-msg tests
- added grep for merged tag to gpgssh merge-msg tests

changes since v3:
- improve readability of prereq setup code by using heredoc and some variables

changes since v2:
- fix swich/case indentation
- BUG() on unknown payload types
- improve test prereq by actually validating ssh-keygen functionality

changes since v1:
- struct signature_check is now used to input payload data into check_function
- payload metadata parsing is completely internal to check_signature. the caller only need to set the payload type in the sigc struct
- small nits and readability fixes
- removed payload_signer parameter. since we now use the struct we can extend
this later.

Fabian Stelzer (9):
t/fmt-merge-msg: do not redirect stderr t/fmt-merge-msg: make gpgssh tests more specific ssh signing: use sigc struct to pass payload ssh signing: add key lifetime test prereqs ssh signing: make verify-commit consider key lifetime ssh signing: make git log verify key lifetime ssh signing: make verify-tag consider key lifetime ssh signing: make fmt-merge-msg consider key lifetime ssh signing: verify ssh-keygen in test prereq

 Documentation/config/gpg.txt     |  5 ++
 builtin/receive-pack.c           |  6 ++-
 commit.c                         |  6 ++-
 fmt-merge-msg.c                  |  5 +-
 gpg-interface.c                  | 90 +++++++++++++++++++++++++-------
 gpg-interface.h                  | 15 ++++--
 log-tree.c                       | 10 ++--
 t/lib-gpg.sh                     | 62 ++++++++++++++++++----
 t/t4202-log.sh                   | 43 +++++++++++++++
 t/t6200-fmt-merge-msg.sh         | 68 ++++++++++++++++++++++--
 t/t7031-verify-tag-signed-ssh.sh | 42 +++++++++++++++
 t/t7528-signed-commit-ssh.sh     | 42 +++++++++++++++
 tag.c                            |  5 +-
 13 files changed, 351 insertions(+), 48 deletions(-)

Range-diff against v5:

 -:  ---------- >  1:  0b3848d23b t/fmt-merge-msg: do not redirect stderr
 -:  ---------- >  2:  f29d838574 t/fmt-merge-msg: make gpgssh tests more specific
 1:  c4447d30f2 =  3:  b065dcb7fb ssh signing: use sigc struct to pass payload
 2:  0bb1617529 =  4:  c37d33db31 ssh signing: add key lifetime test prereqs
 3:  f60bd1efd0 =  5:  640e9a4a99 ssh signing: make verify-commit consider key lifetime
 4:  5fc0ad5c37 =  6:  2e98307c18 ssh signing: make git log verify key lifetime
 5:  f1c225871f =  7:  75d213ab15 ssh signing: make verify-tag consider key lifetime
 6:  1cbd4dbb6b !  8:  498821af14 ssh signing: make fmt-merge-msg consider key lifetime
    @@ t/t6200-fmt-merge-msg.sh: test_expect_success GPGSSH 'message for merging local
     +	test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
     +	git checkout main &&
     +	git fetch . expired-signed &&
    -+	git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
    ++	git fmt-merge-msg <.git/FETCH_HEAD >actual &&
    ++	grep "^Merge tag ${apos}expired-signed${apos}" actual &&
     +	! grep "${GPGSSH_GOOD_SIGNATURE_TRUSTED}" actual
     +'
     +
    @@ t/t6200-fmt-merge-msg.sh: test_expect_success GPGSSH 'message for merging local
     +	test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
     +	git checkout main &&
     +	git fetch . notyetvalid-signed &&
    -+	git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
    ++	git fmt-merge-msg <.git/FETCH_HEAD >actual &&
    ++	grep "^Merge tag ${apos}notyetvalid-signed${apos}" actual &&
     +	! grep "${GPGSSH_GOOD_SIGNATURE_TRUSTED}" actual
     +'
     +
    @@ t/t6200-fmt-merge-msg.sh: test_expect_success GPGSSH 'message for merging local
     +	test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
     +	git checkout main &&
     +	git fetch . timeboxedvalid-signed &&
    -+	git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
    ++	git fmt-merge-msg <.git/FETCH_HEAD >actual &&
    ++	grep "^Merge tag ${apos}timeboxedvalid-signed${apos}" actual &&
     +	grep "${GPGSSH_GOOD_SIGNATURE_TRUSTED}" actual &&
     +	! grep "${GPGSSH_BAD_SIGNATURE}" actual
     +'
    @@ t/t6200-fmt-merge-msg.sh: test_expect_success GPGSSH 'message for merging local
     +	test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
     +	git checkout main &&
     +	git fetch . timeboxedinvalid-signed &&
    -+	git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
    ++	git fmt-merge-msg <.git/FETCH_HEAD >actual &&
    ++	grep "^Merge tag ${apos}timeboxedinvalid-signed${apos}" actual &&
     +	! grep "${GPGSSH_GOOD_SIGNATURE_TRUSTED}" actual
     +'
     +

7: d60f4ec82c = 9: 0816dd2ec8 ssh signing: verify ssh-keygen in test prereq

Signature · 1 line
2.31.1