rcolebaugh / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone

Blame SOURCES/openssh-7.4p1-sha2-signatures.patch

8f2528
diff -up openssh-7.4p1/kex.c.sha2 openssh-7.4p1/kex.c
8f2528
--- openssh-7.4p1/kex.c.sha2	2017-02-17 18:15:53.589835864 +0100
8f2528
+++ openssh-7.4p1/kex.c	2017-02-17 18:17:20.404781663 +0100
8f2528
@@ -379,21 +379,14 @@ static int
8f2528
 kex_send_ext_info(struct ssh *ssh)
8f2528
 {
8f2528
 	int r;
8f2528
-	char *algs;
8f2528
 
8f2528
-	if ((algs = sshkey_alg_list(0, 1, ',')) == NULL)
8f2528
-		return SSH_ERR_ALLOC_FAIL;
8f2528
 	if ((r = sshpkt_start(ssh, SSH2_MSG_EXT_INFO)) != 0 ||
8f2528
 	    (r = sshpkt_put_u32(ssh, 1)) != 0 ||
8f2528
 	    (r = sshpkt_put_cstring(ssh, "server-sig-algs")) != 0 ||
8f2528
-	    (r = sshpkt_put_cstring(ssh, algs)) != 0 ||
8f2528
+	    (r = sshpkt_put_cstring(ssh, "rsa-sha2-256,rsa-sha2-512")) != 0 ||
8f2528
 	    (r = sshpkt_send(ssh)) != 0)
8f2528
-		goto out;
8f2528
-	/* success */
8f2528
-	r = 0;
8f2528
- out:
8f2528
-	free(algs);
8f2528
-	return r;
8f2528
+		return r;
8f2528
+	return 0;
8f2528
 }
8f2528
 
8f2528
 int