From 58964a492275ca9a59a0cd9c8155cb2491b4b909 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Mon, 21 Dec 1998 10:56:39 +0000 Subject: Import of old SSLeay release: SSLeay 0.9.0b --- apps/dsaparam.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'apps/dsaparam.c') diff --git a/apps/dsaparam.c b/apps/dsaparam.c index e9485c0036..6e99289bd3 100644 --- a/apps/dsaparam.c +++ b/apps/dsaparam.c @@ -1,5 +1,5 @@ /* apps/dsaparam.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 @@ -83,7 +83,7 @@ */ #ifndef NOPROTO -static void MS_CALLBACK dsa_cb(int p, int n); +static void MS_CALLBACK dsa_cb(int p, int n, char *arg); #else static void MS_CALLBACK dsa_cb(); #endif @@ -104,7 +104,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); infile=NULL; outfile=NULL; @@ -217,7 +217,8 @@ bad: BIO_printf(bio_err,"Generating DSA parameters, %d bit long prime\n",num); BIO_printf(bio_err,"This could take some time\n"); - dsa=DSA_generate_parameters(num,NULL,0,NULL,NULL,dsa_cb); + dsa=DSA_generate_parameters(num,NULL,0,NULL,NULL, + dsa_cb,(char *)bio_err); } else if (informat == FORMAT_ASN1) dsa=d2i_DSAparams_bio(in,NULL); @@ -322,9 +323,10 @@ end: EXIT(ret); } -static void MS_CALLBACK dsa_cb(p, n) +static void MS_CALLBACK dsa_cb(p, n, arg) int p; int n; +char *arg; { char c='*'; @@ -332,8 +334,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 -- cgit v1.2.3