summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-03-07 12:58:24 +1100
committerDamien Miller <djm@mindrot.org>2002-03-07 12:58:24 +1100
commit6ba693f70e3f5b69b5b8a9b43bf4323c601cc097 (patch)
tree1e897977528a3d7cfe68b34922e8544b09756681
parent399ec97bc2861148dd38708bf7747d59918fb8b2 (diff)
- OpenBSD CVS Sync
- markus@cvs.openbsd.org 2002/03/06 00:20:54 [compat.c dh.c] compat.c
-rw-r--r--ChangeLog8
-rw-r--r--compat.c6
-rw-r--r--dh.c9
3 files changed, 16 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d0365f80..fb1a0dd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+20020307
+ - (djm) OpenBSD CVS Sync
+ - markus@cvs.openbsd.org 2002/03/06 00:20:54
+ [compat.c dh.c]
+ compat.c
+
20020305
- stevesk@cvs.openbsd.org 2002/03/02 09:34:42
[LICENCE]
@@ -7798,4 +7804,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1908 2002/03/05 18:03:10 stevesk Exp $
+$Id: ChangeLog,v 1.1909 2002/03/07 01:58:24 djm Exp $
diff --git a/compat.c b/compat.c
index 050ee47b..0b3aa68c 100644
--- a/compat.c
+++ b/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/dh.c b/dh.c
index 3e1594ea..e691125e 100644
--- a/dh.c
+++ b/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++)