aboutsummaryrefslogtreecommitdiffstats
path: root/apps/gendh.c
diff options
context:
space:
mode:
authorRalf S. Engelschall <rse@openssl.org>1998-12-21 10:56:39 +0000
committerRalf S. Engelschall <rse@openssl.org>1998-12-21 10:56:39 +0000
commit58964a492275ca9a59a0cd9c8155cb2491b4b909 (patch)
treec7b16876a5789463bbbb468ef4829c8129b3d718 /apps/gendh.c
parentd02b48c63a58ea4367a0e905979f140b7d090f86 (diff)
downloadopenssl-58964a492275ca9a59a0cd9c8155cb2491b4b909.tar.gz
Import of old SSLeay release: SSLeay 0.9.0b
Diffstat (limited to 'apps/gendh.c')
-rw-r--r--apps/gendh.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/gendh.c b/apps/gendh.c
index b7b6d0fd62..2790f179fd 100644
--- a/apps/gendh.c
+++ b/apps/gendh.c
@@ -1,5 +1,5 @@
/* apps/gendh.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
@@ -74,7 +74,7 @@
#define PROG gendh_main
#ifndef NOPROTO
-static void MS_CALLBACK dh_cb(int p, int n);
+static void MS_CALLBACK dh_cb(int p, int n, char *arg);
static long dh_load_rand(char *names);
#else
static void MS_CALLBACK dh_cb();
@@ -97,7 +97,7 @@ char **argv;
if (bio_err == NULL)
if ((bio_err=BIO_new(BIO_s_file())) != NULL)
- BIO_set_fp(bio_err,stderr,BIO_NOCLOSE);
+ BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
argv++;
argc--;
@@ -171,7 +171,7 @@ bad:
BIO_printf(bio_err,"Generating DH parameters, %d bit long strong prime, generator of %d\n",num,g);
BIO_printf(bio_err,"This is going to take a long time\n");
- dh=DH_generate_parameters(num,g,dh_cb);
+ dh=DH_generate_parameters(num,g,dh_cb,(char *)bio_err);
if (dh == NULL) goto end;
@@ -191,9 +191,10 @@ end:
EXIT(ret);
}
-static void MS_CALLBACK dh_cb(p, n)
+static void MS_CALLBACK dh_cb(p,n,arg)
int p;
int n;
+char *arg;
{
char c='*';
@@ -201,8 +202,8 @@ int n;
if (p == 1) c='+';
if (p == 2) c='*';
if (p == 3) c='\n';
- BIO_write(bio_err,&c,1);
- BIO_flush(bio_err);
+ BIO_write((BIO *)arg,&c,1);
+ BIO_flush((BIO *)arg);
#ifdef LINT
p=n;
#endif