summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2002-03-06 00:20:55 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2002-03-06 00:20:55 +0000
commitf5a0d2807011f8a9642811c708807e84beae5661 (patch)
treebf87c3a6ccf15771af5d618434f0b75e0d13071a /usr.bin
parenta508446ea04a731dfced279da72e27af22991131 (diff)
compat.c
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/Makefile.inc4
-rw-r--r--usr.bin/ssh/compat.c6
-rw-r--r--usr.bin/ssh/dh.c9
3 files changed, 11 insertions, 8 deletions
diff --git a/usr.bin/ssh/Makefile.inc b/usr.bin/ssh/Makefile.inc
index 9c336bf14e5..68fef921fac 100644
--- a/usr.bin/ssh/Makefile.inc
+++ b/usr.bin/ssh/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.21 2001/10/30 20:32:31 markus Exp $
+# $OpenBSD: Makefile.inc,v 1.22 2002/03/06 00:20:54 markus Exp $
CFLAGS+= -I${.CURDIR}/..
@@ -10,7 +10,7 @@ CDIAGFLAGS+= -Wno-uninitialized
CDIAGFLAGS+= -Wmissing-prototypes
CDIAGFLAGS+= -Wunused
-#DEBUG=-g
+DEBUG=-g
#CFLAGS+= -DSMARTCARD
#LDADD+= -lsectok
diff --git a/usr.bin/ssh/compat.c b/usr.bin/ssh/compat.c
index 050ee47babb..0b3aa68c32a 100644
--- a/usr.bin/ssh/compat.c
+++ b/usr.bin/ssh/compat.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: compat.c,v 1.58 2002/01/21 22:30:12 markus Exp $");
+RCSID("$OpenBSD: compat.c,v 1.59 2002/03/06 00:20:54 markus Exp $");
#include "buffer.h"
#include "packet.h"
@@ -73,8 +73,8 @@ compat_datafellows(const char *version)
{ "OpenSSH_2.5.0*,"
"OpenSSH_2.5.1*,"
"OpenSSH_2.5.2*", SSH_OLD_DHGEX|SSH_BUG_NOREKEY },
- { "OpenSSH_2.5.3*",
- SSH_BUG_NOREKEY },
+ { "OpenSSH_2.5.3*", SSH_BUG_NOREKEY },
+ { "Sun_SSH_1.0*", SSH_BUG_NOREKEY },
{ "OpenSSH*", 0 },
{ "*MindTerm*", 0 },
{ "2.1.0*", SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
diff --git a/usr.bin/ssh/dh.c b/usr.bin/ssh/dh.c
index 3e1594eae79..e691125e0a8 100644
--- a/usr.bin/ssh/dh.c
+++ b/usr.bin/ssh/dh.c
@@ -23,13 +23,14 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: dh.c,v 1.19 2001/12/27 19:37:22 markus Exp $");
+RCSID("$OpenBSD: dh.c,v 1.20 2002/03/06 00:20:54 markus Exp $");
#include "xmalloc.h"
#include <openssl/bn.h>
#include <openssl/dh.h>
#include <openssl/evp.h>
+#include <openssl/err.h>
#include "buffer.h"
#include "cipher.h"
@@ -207,8 +208,10 @@ dh_gen_key(DH *dh, int need)
if ((dh->priv_key = BN_new()) == NULL)
fatal("dh_gen_key: BN_new failed");
/* generate a 2*need bits random private exponent */
- if (!BN_rand(dh->priv_key, 2*need, 0, 0))
- fatal("dh_gen_key: BN_rand failed");
+ if (!BN_rand(dh->priv_key, 2*need, 0, 0)) {
+ int ecode = ERR_get_error();
+ fatal("dh_gen_key: BN_rand failed: %s", ERR_error_string(ecode, NULL));
+ }
if (DH_generate_key(dh) == 0)
fatal("DH_generate_key");
for (i = 0; i <= BN_num_bits(dh->priv_key); i++)