version 1.136, 2018/02/07 02:06:50 |
version 1.137, 2018/07/03 11:39:54 |
|
|
|
|
if ((algs = sshkey_alg_list(0, 1, 1, ',')) == NULL) |
if ((algs = sshkey_alg_list(0, 1, 1, ',')) == NULL) |
return SSH_ERR_ALLOC_FAIL; |
return SSH_ERR_ALLOC_FAIL; |
|
/* XXX filter algs list by allowed pubkey/hostbased types */ |
if ((r = sshpkt_start(ssh, SSH2_MSG_EXT_INFO)) != 0 || |
if ((r = sshpkt_start(ssh, SSH2_MSG_EXT_INFO)) != 0 || |
(r = sshpkt_put_u32(ssh, 1)) != 0 || |
(r = sshpkt_put_u32(ssh, 1)) != 0 || |
(r = sshpkt_put_cstring(ssh, "server-sig-algs")) != 0 || |
(r = sshpkt_put_cstring(ssh, "server-sig-algs")) != 0 || |
|
|
{ |
{ |
struct kex *kex = ssh->kex; |
struct kex *kex = ssh->kex; |
u_int32_t i, ninfo; |
u_int32_t i, ninfo; |
char *name, *found; |
char *name; |
u_char *val; |
u_char *val; |
size_t vlen; |
size_t vlen; |
int r; |
int r; |
|
|
return SSH_ERR_INVALID_FORMAT; |
return SSH_ERR_INVALID_FORMAT; |
} |
} |
debug("%s: %s=<%s>", __func__, name, val); |
debug("%s: %s=<%s>", __func__, name, val); |
found = match_list("rsa-sha2-256", val, NULL); |
kex->server_sig_algs = val; |
if (found) { |
val = NULL; |
kex->rsa_sha2 = 256; |
|
free(found); |
|
} |
|
found = match_list("rsa-sha2-512", val, NULL); |
|
if (found) { |
|
kex->rsa_sha2 = 512; |
|
free(found); |
|
} |
|
} else |
} else |
debug("%s: %s (unrecognised)", __func__, name); |
debug("%s: %s (unrecognised)", __func__, name); |
free(name); |
free(name); |