=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/kexdhs.c,v retrieving revision 1.3.2.2 retrieving revision 1.4 diff -u -r1.3.2.2 -r1.4 --- src/usr.bin/ssh/Attic/kexdhs.c 2006/11/08 00:17:14 1.3.2.2 +++ src/usr.bin/ssh/Attic/kexdhs.c 2006/03/19 18:51:18 1.4 @@ -1,4 +1,3 @@ -/* $OpenBSD: kexdhs.c,v 1.3.2.2 2006/11/08 00:17:14 brad Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -23,23 +22,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "includes.h" -#include -#include -#include - #include "xmalloc.h" -#include "buffer.h" #include "key.h" -#include "cipher.h" #include "kex.h" #include "log.h" #include "packet.h" #include "dh.h" #include "ssh2.h" -#ifdef GSSAPI -#include "ssh-gss.h" -#endif #include "monitor_wrap.h" void @@ -49,8 +40,8 @@ DH *dh; Key *server_host_key; u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; - u_int sbloblen, klen, hashlen, slen; - int kout; + u_int sbloblen, klen, kout, hashlen; + u_int slen; /* generate server DH public key */ switch (kex->kex_type) { @@ -98,15 +89,13 @@ klen = DH_size(dh); kbuf = xmalloc(klen); - if ((kout = DH_compute_key(kbuf, dh_client_pub, dh)) < 0) - fatal("DH_compute_key: failed"); + kout = DH_compute_key(kbuf, dh_client_pub, dh); #ifdef DEBUG_KEXDH dump_digest("shared secret", kbuf, kout); #endif if ((shared_secret = BN_new()) == NULL) fatal("kexdh_server: BN_new failed"); - if (BN_bin2bn(kbuf, kout, shared_secret) == NULL) - fatal("kexdh_server: BN_bin2bn failed"); + BN_bin2bn(kbuf, kout, shared_secret); memset(kbuf, 0, klen); xfree(kbuf);