From 82fc1d9c28e834549f61e4c91b3f6bbdf4c48153 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 3 Feb 2000 02:56:48 +0000 Subject: Add new -notext option to 'ca', -pubkey option to spkac. Remove some "WTF??" casts from applications. Fixes to keep VC++ happy and avoid warnings. Docs tidy. --- crypto/dsa/dsa.h | 2 +- crypto/dsa/dsa_gen.c | 3 ++- crypto/dsa/dsatest.c | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'crypto/dsa') diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h index e59c7d293f..68d9912cbc 100644 --- a/crypto/dsa/dsa.h +++ b/crypto/dsa/dsa.h @@ -182,7 +182,7 @@ DSA * d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length); DSA * d2i_DSAparams(DSA **a, unsigned char **pp, long length); DSA * DSA_generate_parameters(int bits, unsigned char *seed,int seed_len, int *counter_ret, unsigned long *h_ret,void - (*callback)(),void *cb_arg); + (*callback)(int, int, void *),void *cb_arg); int DSA_generate_key(DSA *a); int i2d_DSAPublicKey(DSA *a, unsigned char **pp); int i2d_DSAPrivateKey(DSA *a, unsigned char **pp); diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index 248a70be4a..65602dda77 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -80,7 +80,8 @@ #include DSA *DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len, - int *counter_ret, unsigned long *h_ret, void (*callback)(), + int *counter_ret, unsigned long *h_ret, + void (*callback)(int, int, void *), void *cb_arg) { int ok=0; diff --git a/crypto/dsa/dsatest.c b/crypto/dsa/dsatest.c index f096ed0688..0705060071 100644 --- a/crypto/dsa/dsatest.c +++ b/crypto/dsa/dsatest.c @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) #define MS_CALLBACK #endif -static void MS_CALLBACK dsa_cb(int p, int n, char *arg); +static void MS_CALLBACK dsa_cb(int p, int n, void *arg); /* seed, out_p, out_q, out_g are taken from the updated Appendix 5 to * FIPS PUB 186 and also appear in Appendix 5 to FIPS PIB 186-1 */ @@ -145,7 +145,7 @@ int main(int argc, char **argv) BIO_printf(bio_err,"test generation of DSA parameters\n"); - dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb,(char *)bio_err); + dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb,bio_err); BIO_printf(bio_err,"seed\n"); for (i=0; i<20; i+=4) @@ -209,7 +209,7 @@ end: return(0); } -static void MS_CALLBACK dsa_cb(int p, int n, char *arg) +static void MS_CALLBACK dsa_cb(int p, int n, void *arg) { char c='*'; static int ok=0,num=0; @@ -218,8 +218,8 @@ static void MS_CALLBACK dsa_cb(int p, int n, char *arg) if (p == 1) c='+'; if (p == 2) { c='*'; ok++; } if (p == 3) c='\n'; - BIO_write((BIO *)arg,&c,1); - (void)BIO_flush((BIO *)arg); + BIO_write(arg,&c,1); + (void)BIO_flush(arg); if (!ok && (p == 0) && (num > 1)) { -- cgit v1.2.3