version 1.327, 2020/10/03 08:11:28 |
version 1.328, 2020/10/04 09:45:01 |
|
|
*/ |
*/ |
best = first_alg(options.hostkeyalgorithms); |
best = first_alg(options.hostkeyalgorithms); |
if (lookup_key_in_hostkeys_by_type(hostkeys, |
if (lookup_key_in_hostkeys_by_type(hostkeys, |
sshkey_type_plain(sshkey_type_from_name(best)), NULL)) { |
sshkey_type_plain(sshkey_type_from_name(best)), |
|
sshkey_ecdsa_nid_from_name(best), NULL)) { |
debug3("%s: have matching best-preference key type %s, " |
debug3("%s: have matching best-preference key type %s, " |
"using HostkeyAlgorithms verbatim", __func__, best); |
"using HostkeyAlgorithms verbatim", __func__, best); |
ret = xstrdup(options.hostkeyalgorithms); |
ret = xstrdup(options.hostkeyalgorithms); |
|
|
} |
} |
/* If the key appears in known_hosts then prefer it */ |
/* If the key appears in known_hosts then prefer it */ |
if (lookup_key_in_hostkeys_by_type(hostkeys, |
if (lookup_key_in_hostkeys_by_type(hostkeys, |
sshkey_type_plain(ktype), NULL)) { |
sshkey_type_plain(ktype), |
|
sshkey_ecdsa_nid_from_name(alg), NULL)) { |
ALG_APPEND(first, alg); |
ALG_APPEND(first, alg); |
continue; |
continue; |
} |
} |