]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/lib-gpg: fix ssh-keygen -Y check-novalidate with openssh-9.0
authorTodd Zullinger <tmz@pobox.com>
Thu, 25 May 2023 03:10:24 +0000 (23:10 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 May 2023 04:37:08 +0000 (13:37 +0900)
OpenSSH-9.0 requires a namespace option with `-Y check-novalidate`.
This was added in openssh-portable commit a0b5816f8 (upstream:
ssh-keygen -Y check-novalidate requires namespace or SEGV, 2022-03-18).

The -n option was documented as a required option since check-novalidate
was added in openssh-portable 8aa2aa3cd (upstream: Allow testing
signature syntax and validity without verifying, 2019-09-16).

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-gpg.sh

index 114785586abde524fb13cb29e4b1f357ae9a3286..28652ed91fb3137cf614a8b7f184565b06a3d87f 100644 (file)
@@ -136,7 +136,7 @@ test_lazy_prereq GPGSSH '
 
 test_lazy_prereq GPGSSH_VERIFYTIME '
        # Check if ssh-keygen has a verify-time option by passing an invalid date to it
-       ssh-keygen -Overify-time=INVALID -Y check-novalidate -s doesnotmatter 2>&1 | grep -q -F "Invalid \"verify-time\"" &&
+       ssh-keygen -Overify-time=INVALID -Y check-novalidate -n "git" -s doesnotmatter 2>&1 | grep -q -F "Invalid \"verify-time\"" &&
 
        # Set up keys with key lifetimes
        ssh-keygen -t ed25519 -N "" -C "timeboxed valid key" -f "${GPGSSH_KEY_TIMEBOXEDVALID}" >/dev/null &&