version 1.274, 2018/07/03 13:20:25 |
version 1.275, 2018/07/04 13:49:31 |
|
|
ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port) |
ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port) |
{ |
{ |
char *myproposal[PROPOSAL_MAX] = { KEX_CLIENT }; |
char *myproposal[PROPOSAL_MAX] = { KEX_CLIENT }; |
char *s; |
char *s, *all_key; |
struct kex *kex; |
struct kex *kex; |
int r; |
int r; |
|
|
|
|
myproposal[PROPOSAL_MAC_ALGS_CTOS] = |
myproposal[PROPOSAL_MAC_ALGS_CTOS] = |
myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs; |
myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs; |
if (options.hostkeyalgorithms != NULL) { |
if (options.hostkeyalgorithms != NULL) { |
if (kex_assemble_names(KEX_DEFAULT_PK_ALG, |
all_key = sshkey_alg_list(0, 0, 1, ','); |
&options.hostkeyalgorithms) != 0) |
if (kex_assemble_names(&options.hostkeyalgorithms, |
|
KEX_DEFAULT_PK_ALG, all_key) != 0) |
fatal("%s: kex_assemble_namelist", __func__); |
fatal("%s: kex_assemble_namelist", __func__); |
|
free(all_key); |
myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = |
myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = |
compat_pkalg_proposal(options.hostkeyalgorithms); |
compat_pkalg_proposal(options.hostkeyalgorithms); |
} else { |
} else { |