summaryrefslogtreecommitdiff
path: root/ssh_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh_api.c')
-rw-r--r--ssh_api.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ssh_api.c b/ssh_api.c
index e0b195521..129404b20 100644
--- a/ssh_api.c
+++ b/ssh_api.c
@@ -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 */
55int use_privsep = 0; 55int use_privsep = 0;
56int mm_sshkey_sign(struct sshkey *, u_char **, u_int *, 56int 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
60DH *mm_choose_dh(int, int, int); 60DH *mm_choose_dh(int, int, int);
@@ -66,8 +66,8 @@ u_int session_id2_len = 0;
66 66
67int 67int
68mm_sshkey_sign(struct sshkey *key, u_char **sigp, u_int *lenp, 68mm_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}