Skip to content

Commit 6931049

Browse files
committed
ssh signing: signal an error with a negative return value
The other backend for the sign_buffer() function followed our usual "an error is signalled with a negative return" convention, but the SSH signer did not. Even though we already fixed the caller that assumed only a negative return value is an error, tighten the callee to signal an error with a negative return as well. This way, the callees will be strict on what they produce, while the callers will be lenient in what they accept. Signed-off-by: Junio C Hamano <[email protected]>
1 parent abfbff6 commit 6931049

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gpg-interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ static int sign_buffer_ssh(struct strbuf *buffer, struct strbuf *signature,
10881088
if (strstr(signer_stderr.buf, "usage:"))
10891089
error(_("ssh-keygen -Y sign is needed for ssh signing (available in openssh version 8.2p1+)"));
10901090

1091-
error("%s", signer_stderr.buf);
1091+
ret = error("%s", signer_stderr.buf);
10921092
goto out;
10931093
}
10941094

0 commit comments

Comments
 (0)