summaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2000-02-03 02:56:48 +0000
committerDr. Stephen Henson <steve@openssl.org>2000-02-03 02:56:48 +0000
commit82fc1d9c28e834549f61e4c91b3f6bbdf4c48153 (patch)
tree256d2a1039951109c24400fea60632e7e6d66d43 /crypto/dsa
parent7999c65c9bfd80ec0f07f6eb5be5ce2e36927298 (diff)
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.
Diffstat (limited to 'crypto/dsa')
-rw-r--r--crypto/dsa/dsa.h2
-rw-r--r--crypto/dsa/dsa_gen.c3
-rw-r--r--crypto/dsa/dsatest.c10
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))
{