diff options
-rw-r--r-- | readconf.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/readconf.c b/readconf.c index 20f1c04ee..f3cac6b3a 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readconf.c,v 1.325 2020/02/03 23:47:57 djm Exp $ */ | 1 | /* $OpenBSD: readconf.c,v 1.326 2020/02/06 22:46:31 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -2663,8 +2663,20 @@ dump_cfg_forwards(OpCodes code, u_int count, const struct Forward *fwds) | |||
2663 | void | 2663 | void |
2664 | dump_client_config(Options *o, const char *host) | 2664 | dump_client_config(Options *o, const char *host) |
2665 | { | 2665 | { |
2666 | int i; | 2666 | int i, r; |
2667 | char buf[8]; | 2667 | char buf[8], *all_key; |
2668 | |||
2669 | /* | ||
2670 | * Expand HostKeyAlgorithms name lists. This isn't handled in | ||
2671 | * fill_default_options() like the other algorithm lists because | ||
2672 | * the host key algorithms are by default dynamically chosen based | ||
2673 | * on the host's keys found in known_hosts. | ||
2674 | */ | ||
2675 | all_key = sshkey_alg_list(0, 0, 1, ','); | ||
2676 | if ((r = kex_assemble_names(&o->hostkeyalgorithms, kex_default_pk_alg(), | ||
2677 | all_key)) != 0) | ||
2678 | fatal("%s: expand HostKeyAlgorithms: %s", __func__, ssh_err(r)); | ||
2679 | free(all_key); | ||
2668 | 2680 | ||
2669 | /* Most interesting options first: user, host, port */ | 2681 | /* Most interesting options first: user, host, port */ |
2670 | dump_cfg_string(oUser, o->user); | 2682 | dump_cfg_string(oUser, o->user); |