sshconnect2.c (128460) | sshconnect2.c (137019) |
---|---|
1/* 2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 9 unchanged lines hidden (view full) --- 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24 25#include "includes.h" | 1/* 2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 9 unchanged lines hidden (view full) --- 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24 25#include "includes.h" |
26RCSID("$OpenBSD: sshconnect2.c,v 1.135 2004/03/05 10:53:58 markus Exp $"); | 26RCSID("$OpenBSD: sshconnect2.c,v 1.138 2004/06/13 12:53:24 djm Exp $"); |
27 28#include "openbsd-compat/sys-queue.h" 29 30#include "ssh.h" 31#include "ssh2.h" 32#include "xmalloc.h" 33#include "buffer.h" 34#include "packet.h" 35#include "compat.h" 36#include "bufaux.h" 37#include "cipher.h" 38#include "kex.h" 39#include "myproposal.h" 40#include "sshconnect.h" 41#include "authfile.h" 42#include "dh.h" 43#include "authfd.h" 44#include "log.h" 45#include "readconf.h" | 27 28#include "openbsd-compat/sys-queue.h" 29 30#include "ssh.h" 31#include "ssh2.h" 32#include "xmalloc.h" 33#include "buffer.h" 34#include "packet.h" 35#include "compat.h" 36#include "bufaux.h" 37#include "cipher.h" 38#include "kex.h" 39#include "myproposal.h" 40#include "sshconnect.h" 41#include "authfile.h" 42#include "dh.h" 43#include "authfd.h" 44#include "log.h" 45#include "readconf.h" |
46#include "readpass.h" | 46#include "misc.h" |
47#include "match.h" 48#include "dispatch.h" 49#include "canohost.h" 50#include "msg.h" 51#include "pathnames.h" 52 53#ifdef GSSAPI 54#include "ssh-gss.h" --- 60 unchanged lines hidden (view full) --- 115 options.hostkeyalgorithms; 116 117 if (options.rekey_limit) 118 packet_set_rekey_limit(options.rekey_limit); 119 120 /* start key exchange */ 121 kex = kex_setup(myproposal); 122 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; | 47#include "match.h" 48#include "dispatch.h" 49#include "canohost.h" 50#include "msg.h" 51#include "pathnames.h" 52 53#ifdef GSSAPI 54#include "ssh-gss.h" --- 60 unchanged lines hidden (view full) --- 115 options.hostkeyalgorithms; 116 117 if (options.rekey_limit) 118 packet_set_rekey_limit(options.rekey_limit); 119 120 /* start key exchange */ 121 kex = kex_setup(myproposal); 122 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; |
123 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; |
|
123 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; 124 kex->client_version_string=client_version_string; 125 kex->server_version_string=server_version_string; 126 kex->verify_host_key=&verify_host_key_callback; 127 128 xxx_kex = kex; 129 130 dispatch_run(DISPATCH_BLOCK, &kex->done, kex); --- 322 unchanged lines hidden (view full) --- 453 debug2("input_userauth_pk_ok: fp %s", fp); 454 xfree(fp); 455 456 /* 457 * search keys in the reverse order, because last candidate has been 458 * moved to the end of the queue. this also avoids confusion by 459 * duplicate keys 460 */ | 124 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; 125 kex->client_version_string=client_version_string; 126 kex->server_version_string=server_version_string; 127 kex->verify_host_key=&verify_host_key_callback; 128 129 xxx_kex = kex; 130 131 dispatch_run(DISPATCH_BLOCK, &kex->done, kex); --- 322 unchanged lines hidden (view full) --- 454 debug2("input_userauth_pk_ok: fp %s", fp); 455 xfree(fp); 456 457 /* 458 * search keys in the reverse order, because last candidate has been 459 * moved to the end of the queue. this also avoids confusion by 460 * duplicate keys 461 */ |
461 TAILQ_FOREACH_REVERSE(id, &authctxt->keys, next, idlist) { | 462 TAILQ_FOREACH_REVERSE(id, &authctxt->keys, idlist, next) { |
462 if (key_equal(key, id->key)) { 463 sent = sign_and_send_pubkey(authctxt, id); 464 break; 465 } 466 } 467done: 468 if (key != NULL) 469 key_free(key); --- 1015 unchanged lines hidden --- | 463 if (key_equal(key, id->key)) { 464 sent = sign_and_send_pubkey(authctxt, id); 465 break; 466 } 467 } 468done: 469 if (key != NULL) 470 key_free(key); --- 1015 unchanged lines hidden --- |