diff options
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index ff3b0bede..db95cb214 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect2.c,v 1.273 2018/07/03 13:07:58 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect2.c,v 1.274 2018/07/03 13:20:25 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2008 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2008 Damien Miller. All rights reserved. |
@@ -996,7 +996,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, struct ssh *ssh) | |||
996 | static char * | 996 | static char * |
997 | key_sig_algorithm(struct ssh *ssh, const struct sshkey *key) | 997 | key_sig_algorithm(struct ssh *ssh, const struct sshkey *key) |
998 | { | 998 | { |
999 | char *allowed, *oallowed, *cp, *alg = NULL; | 999 | char *allowed, *oallowed, *cp, *tmp, *alg = NULL; |
1000 | 1000 | ||
1001 | /* | 1001 | /* |
1002 | * The signature algorithm will only differ from the key algorithm | 1002 | * The signature algorithm will only differ from the key algorithm |
@@ -1020,7 +1020,10 @@ key_sig_algorithm(struct ssh *ssh, const struct sshkey *key) | |||
1020 | while ((cp = strsep(&allowed, ",")) != NULL) { | 1020 | while ((cp = strsep(&allowed, ",")) != NULL) { |
1021 | if (sshkey_type_from_name(cp) != key->type) | 1021 | if (sshkey_type_from_name(cp) != key->type) |
1022 | continue; | 1022 | continue; |
1023 | alg = match_list(cp, ssh->kex->server_sig_algs, NULL); | 1023 | tmp = match_list(sshkey_sigalg_by_name(cp), ssh->kex->server_sig_algs, NULL); |
1024 | if (tmp != NULL) | ||
1025 | alg = xstrdup(cp); | ||
1026 | free(tmp); | ||
1024 | if (alg != NULL) | 1027 | if (alg != NULL) |
1025 | break; | 1028 | break; |
1026 | } | 1029 | } |