diff options
Diffstat (limited to 'crypto/dsa')
-rw-r--r-- | crypto/dsa/dsa.h | 2 | ||||
-rw-r--r-- | crypto/dsa/dsa_gen.c | 3 | ||||
-rw-r--r-- | crypto/dsa/dsatest.c | 10 |
3 files changed, 8 insertions, 7 deletions
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 <openssl/rand.h> 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)) { |