X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fdsa%2Fdsatest.c;h=39bb712c4a49f4717cd94552c9cc1f692382180a;hb=8d697db1d0ae899bbc315007d7b631cd12395196;hp=894d2dbf047ad2fa15ff9ebe549be60cf910daa5;hpb=d02b48c63a58ea4367a0e905979f140b7d090f86;p=oweals%2Fopenssl.git diff --git a/crypto/dsa/dsatest.c b/crypto/dsa/dsatest.c index 894d2dbf04..39bb712c4a 100644 --- a/crypto/dsa/dsatest.c +++ b/crypto/dsa/dsatest.c @@ -1,5 +1,5 @@ /* crypto/dsa/dsatest.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 @@ -61,16 +61,12 @@ #include #include #include -#ifdef WIN16 -#define APPS_WIN16 -#endif #include "crypto.h" #include "rand.h" #include "bio.h" #include "err.h" #include "dsa.h" - -#ifdef WIN16 +#ifdef WINDOWS #include "../bio/bss_file.c" #endif @@ -81,7 +77,7 @@ #endif #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 @@ -135,7 +131,8 @@ char **argv; BIO_printf(bio_err,"test generation of DSA parameters\n"); BIO_printf(bio_err,"expect '.*' followed by 5 lines of '.'s and '+'s\n"); - dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb); + dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb, + (char *)bio_err); BIO_printf(bio_err,"seed\n"); for (i=0; i<20; i+=4) @@ -192,9 +189,10 @@ end: return(0); } -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='*'; static int ok=0,num=0; @@ -203,12 +201,12 @@ int n; if (p == 1) c='+'; if (p == 2) { c='*'; ok++; } 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); if (!ok && (p == 0) && (num > 1)) { - BIO_printf(bio_err,"error in dsatest\n"); + BIO_printf((BIO *)arg,"error in dsatest\n"); exit(1); } }