[PATCH 2/2] Specify signature algorithm during server hostkeys prove

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



From: Maxime Rey <maximejeanrey@xxxxxxxxx>

Set sigalg to the correct key algorithm for every key type.  This
allow sshd to verify the signing algorithm used by ssh-agent
during the hostkey-prove.
---
 serverloop.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/serverloop.c b/serverloop.c
index 757cc6f02..4ef7998cb 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -699,6 +699,9 @@ server_input_hostkeys_prove(struct ssh *ssh, struct sshbuf **respp)
 			else if (ssh->kex->flags & KEX_RSA_SHA2_256_SUPPORTED)
 				sigalg = "rsa-sha2-256";
 		}
+		else
+			sigalg = sshkey_ssh_name(key);
+
 		debug3_f("sign %s key (index %d) using sigalg %s",
 		    sshkey_type(key), ndx, sigalg == NULL ? "default" : sigalg);
 		if ((r = sshbuf_put_cstring(sigbuf,
-- 
2.47.0

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux