summaryrefslogtreecommitdiff
path: root/dh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-03-07 12:58:42 +1100
committerDamien Miller <djm@mindrot.org>2002-03-07 12:58:42 +1100
commit6d6c5d202f28608c4962c9c50b394b2a37fc1343 (patch)
treeae1a8572ed66601421eb8dde2f1270d794206c13 /dh.c
parent6ba693f70e3f5b69b5b8a9b43bf4323c601cc097 (diff)
downloadopenssh-git-6d6c5d202f28608c4962c9c50b394b2a37fc1343.tar.gz
- markus@cvs.openbsd.org 2002/03/06 00:23:27
[compat.c dh.c] undo
Diffstat (limited to 'dh.c')
-rw-r--r--dh.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/dh.c b/dh.c
index e691125e..33187e02 100644
--- a/dh.c
+++ b/dh.c
@@ -23,14 +23,13 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: dh.c,v 1.20 2002/03/06 00:20:54 markus Exp $");
+RCSID("$OpenBSD: dh.c,v 1.21 2002/03/06 00:23:27 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"
@@ -208,10 +207,8 @@ 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)) {
- int ecode = ERR_get_error();
- fatal("dh_gen_key: BN_rand failed: %s", ERR_error_string(ecode, NULL));
- }
+ if (!BN_rand(dh->priv_key, 2*need, 0, 0))
+ fatal("dh_gen_key: BN_rand failed");
if (DH_generate_key(dh) == 0)
fatal("DH_generate_key");
for (i = 0; i <= BN_num_bits(dh->priv_key); i++)