summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2015-01-19 20:16:15 +0000
committerDamien Miller <djm@mindrot.org>2015-01-20 09:19:39 +1100
commit57d10cbe861a235dd269c74fb2fe248469ecee9d (patch)
treec65deed24700490bd3b20300c4829d4d5466ff6d /sshconnect2.c
parent3fdc88a0def4f86aa88a5846ac079dc964c0546a (diff)
upstream commit
adapt kex to sshbuf and struct ssh; ok djm@
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index e0d129996..e5802abcc 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.218 2015/01/19 20:07:45 markus Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.219 2015/01/19 20:16:15 markus 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.
@@ -92,7 +92,7 @@ char *xxx_host;
92struct sockaddr *xxx_hostaddr; 92struct sockaddr *xxx_hostaddr;
93 93
94static int 94static int
95verify_host_key_callback(Key *hostkey) 95verify_host_key_callback(Key *hostkey, struct ssh *ssh)
96{ 96{
97 if (verify_host_key(xxx_host, xxx_hostaddr, hostkey) == -1) 97 if (verify_host_key(xxx_host, xxx_hostaddr, hostkey) == -1)
98 fatal("Host key verification failed."); 98 fatal("Host key verification failed.");
@@ -157,7 +157,7 @@ void
157ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port) 157ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
158{ 158{
159 char *myproposal[PROPOSAL_MAX] = { KEX_CLIENT }; 159 char *myproposal[PROPOSAL_MAX] = { KEX_CLIENT };
160 Kex *kex; 160 struct kex *kex;
161 161
162 xxx_host = host; 162 xxx_host = host;
163 xxx_hostaddr = hostaddr; 163 xxx_hostaddr = hostaddr;
@@ -204,8 +204,8 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
204 (time_t)options.rekey_interval); 204 (time_t)options.rekey_interval);
205 205
206 /* start key exchange */ 206 /* start key exchange */
207 kex = kex_setup(myproposal); 207 kex_setup(active_state, myproposal);
208 active_state->kex = kex; 208 kex = active_state->kex;
209#ifdef WITH_OPENSSL 209#ifdef WITH_OPENSSL
210 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; 210 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client;
211 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; 211 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client;
@@ -218,7 +218,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
218 kex->server_version_string=server_version_string; 218 kex->server_version_string=server_version_string;
219 kex->verify_host_key=&verify_host_key_callback; 219 kex->verify_host_key=&verify_host_key_callback;
220 220
221 dispatch_run(DISPATCH_BLOCK, &kex->done, kex); 221 dispatch_run(DISPATCH_BLOCK, &kex->done, active_state);
222 222
223 if (options.use_roaming && !kex->roaming) { 223 if (options.use_roaming && !kex->roaming) {
224 debug("Roaming not allowed by server"); 224 debug("Roaming not allowed by server");