diff options
Diffstat (limited to 'ssh_api.c')
-rw-r--r-- | ssh_api.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh_api.c,v 1.19 2019/10/31 21:23:19 djm Exp $ */ | 1 | /* $OpenBSD: ssh_api.c,v 1.21 2020/08/27 01:06:18 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2012 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2012 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -54,7 +54,7 @@ int _ssh_host_key_sign(struct ssh *, struct sshkey *, struct sshkey *, | |||
54 | */ | 54 | */ |
55 | int use_privsep = 0; | 55 | int use_privsep = 0; |
56 | int mm_sshkey_sign(struct sshkey *, u_char **, u_int *, | 56 | int mm_sshkey_sign(struct sshkey *, u_char **, u_int *, |
57 | const u_char *, u_int, const char *, const char *, u_int); | 57 | const u_char *, u_int, const char *, const char *, const char *, u_int); |
58 | 58 | ||
59 | #ifdef WITH_OPENSSL | 59 | #ifdef WITH_OPENSSL |
60 | DH *mm_choose_dh(int, int, int); | 60 | DH *mm_choose_dh(int, int, int); |
@@ -66,8 +66,8 @@ u_int session_id2_len = 0; | |||
66 | 66 | ||
67 | int | 67 | int |
68 | mm_sshkey_sign(struct sshkey *key, u_char **sigp, u_int *lenp, | 68 | mm_sshkey_sign(struct sshkey *key, u_char **sigp, u_int *lenp, |
69 | const u_char *data, u_int datalen, const char *alg, const char *sk_provider, | 69 | const u_char *data, u_int datalen, const char *alg, |
70 | u_int compat) | 70 | const char *sk_provider, const char *sk_pin, u_int compat) |
71 | { | 71 | { |
72 | return (-1); | 72 | return (-1); |
73 | } | 73 | } |
@@ -152,7 +152,6 @@ ssh_free(struct ssh *ssh) | |||
152 | { | 152 | { |
153 | struct key_entry *k; | 153 | struct key_entry *k; |
154 | 154 | ||
155 | ssh_packet_close(ssh); | ||
156 | /* | 155 | /* |
157 | * we've only created the public keys variants in case we | 156 | * we've only created the public keys variants in case we |
158 | * are a acting as a server. | 157 | * are a acting as a server. |
@@ -167,8 +166,7 @@ ssh_free(struct ssh *ssh) | |||
167 | TAILQ_REMOVE(&ssh->private_keys, k, next); | 166 | TAILQ_REMOVE(&ssh->private_keys, k, next); |
168 | free(k); | 167 | free(k); |
169 | } | 168 | } |
170 | if (ssh->kex) | 169 | ssh_packet_close(ssh); |
171 | kex_free(ssh->kex); | ||
172 | free(ssh); | 170 | free(ssh); |
173 | } | 171 | } |
174 | 172 | ||
@@ -569,5 +567,5 @@ _ssh_host_key_sign(struct ssh *ssh, struct sshkey *privkey, | |||
569 | const u_char *data, size_t dlen, const char *alg) | 567 | const u_char *data, size_t dlen, const char *alg) |
570 | { | 568 | { |
571 | return sshkey_sign(privkey, signature, slen, data, dlen, | 569 | return sshkey_sign(privkey, signature, slen, data, dlen, |
572 | alg, NULL, ssh->compat); | 570 | alg, NULL, NULL, ssh->compat); |
573 | } | 571 | } |