Deleted Added
sdiff udiff text old ( 113908 ) new ( 137015 )
full compact
1/*
2 * Copyright (c) 2001 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: kexdhc.c,v 1.1 2003/02/16 17:09:57 markus Exp $");
27
28#include "xmalloc.h"
29#include "key.h"
30#include "kex.h"
31#include "log.h"
32#include "packet.h"
33#include "dh.h"
34#include "ssh2.h"

--- 4 unchanged lines hidden (view full) ---

39 BIGNUM *dh_server_pub = NULL, *shared_secret = NULL;
40 DH *dh;
41 Key *server_host_key;
42 u_char *server_host_key_blob = NULL, *signature = NULL;
43 u_char *kbuf, *hash;
44 u_int klen, kout, slen, sbloblen;
45
46 /* generate and send 'e', client DH public key */
47 dh = dh_new_group1();
48 dh_gen_key(dh, kex->we_need * 8);
49 packet_start(SSH2_MSG_KEXDH_INIT);
50 packet_put_bignum2(dh->pub_key);
51 packet_send();
52
53 debug("sending SSH2_MSG_KEXDH_INIT");
54#ifdef DEBUG_KEXDH
55 DHparams_print_fp(stderr, dh);

--- 82 unchanged lines hidden ---