Skip to content

Commit ca7a5bf

Browse files
peffgitster
authored andcommitted
t/lib-gpg: avoid broken versions of ssh-keygen
The "-Y find-principals" option of ssh-keygen seems to be broken in Debian's openssh-client 1:8.7p1-1, whereas it works fine in 1:8.4p1-5. This causes several failures for GPGSSH tests. We fulfill the prerequisite because generating the keys works fine, but actually verifying a signature causes results ranging from bogus results to ssh-keygen segfaulting. We can find the broken version during the prereq check by feeding it empty input. This should result in it complaining to stderr, but in the broken version it triggers the segfault, causing the GPGSSH tests to be skipped. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 65db97b commit ca7a5bf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/lib-gpg.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ test_lazy_prereq GPGSSH '
104104
test $? != 127 || exit 1
105105
echo $ssh_version | grep -q "find-principals:missing signature file"
106106
test $? = 0 || exit 1;
107+
108+
# some broken versions of ssh-keygen segfault on find-principals;
109+
# avoid testing with them.
110+
ssh-keygen -Y find-principals -f /dev/null -s /dev/null
111+
test $? = 139 && exit 1
112+
107113
mkdir -p "${GNUPGHOME}" &&
108114
chmod 0700 "${GNUPGHOME}" &&
109115
ssh-keygen -t ed25519 -N "" -C "git ed25519 key" -f "${GPGSSH_KEY_PRIMARY}" >/dev/null &&

0 commit comments

Comments
 (0)