diff options
author | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-04-19 21:31:43 +0000 |
commit | 6b691a5c85ddc4e407e32781841fee5c029506cd (patch) | |
tree | 436f1127406e1cacfe83dfcbfff824d89c47d834 /crypto/dsa | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) | |
download | openssl-6b691a5c85ddc4e407e32781841fee5c029506cd.tar.gz |
Change functions to ANSI C.
Diffstat (limited to 'crypto/dsa')
-rw-r--r-- | crypto/dsa/dsa_asn1.c | 12 | ||||
-rw-r--r-- | crypto/dsa/dsa_err.c | 2 | ||||
-rw-r--r-- | crypto/dsa/dsa_gen.c | 17 | ||||
-rw-r--r-- | crypto/dsa/dsa_key.c | 3 | ||||
-rw-r--r-- | crypto/dsa/dsa_lib.c | 8 | ||||
-rw-r--r-- | crypto/dsa/dsa_sign.c | 22 | ||||
-rw-r--r-- | crypto/dsa/dsa_vrf.c | 15 | ||||
-rw-r--r-- | crypto/dsa/dsagen.c | 3 | ||||
-rw-r--r-- | crypto/dsa/dsatest.c | 9 |
9 files changed, 24 insertions, 67 deletions
diff --git a/crypto/dsa/dsa_asn1.c b/crypto/dsa/dsa_asn1.c index b7fa7eda4f..97c37fb592 100644 --- a/crypto/dsa/dsa_asn1.c +++ b/crypto/dsa/dsa_asn1.c @@ -21,8 +21,7 @@ DSA_SIG *DSA_SIG_new(void) return(ret); } -void DSA_SIG_free(r) -DSA_SIG *r; +void DSA_SIG_free(DSA_SIG *r) { if (r == NULL) return; if (r->r) BN_clear_free(r->r); @@ -30,9 +29,7 @@ DSA_SIG *r; Free(r); } -int i2d_DSA_SIG(v,pp) -DSA_SIG *v; -unsigned char **pp; +int i2d_DSA_SIG(DSA_SIG *v, unsigned char **pp) { int t=0,len; ASN1_INTEGER rbs,sbs; @@ -72,10 +69,7 @@ unsigned char **pp; return(t); } -DSA_SIG *d2i_DSA_SIG(a,pp,length) -DSA_SIG **a; -unsigned char **pp; -long length; +DSA_SIG *d2i_DSA_SIG(DSA_SIG **a, unsigned char **pp, long length) { int i=ERR_R_NESTED_ASN1_ERROR; ASN1_INTEGER *bs=NULL; diff --git a/crypto/dsa/dsa_err.c b/crypto/dsa/dsa_err.c index c3a4f4d73b..d4cbe1d74b 100644 --- a/crypto/dsa/dsa_err.c +++ b/crypto/dsa/dsa_err.c @@ -88,7 +88,7 @@ static ERR_STRING_DATA DSA_str_reasons[]= #endif -void ERR_load_DSA_strings() +void ERR_load_DSA_strings(void) { static int init=1; diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index 8202b80292..4f677d5b93 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -72,15 +72,9 @@ #include "dsa.h" #include "rand.h" -DSA *DSA_generate_parameters(bits,seed_in,seed_len,counter_ret,h_ret,callback, - cb_arg) -int bits; -unsigned char *seed_in; -int seed_len; -int *counter_ret; -unsigned long *h_ret; -void (*callback)(); -char *cb_arg; +DSA *DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len, + int *counter_ret, unsigned long *h_ret, void (*callback)(), + char *cb_arg) { int ok=0; unsigned char seed[SHA_DIGEST_LENGTH]; @@ -255,10 +249,7 @@ err: return(ok?ret:NULL); } -int DSA_is_prime(w, callback,cb_arg) -BIGNUM *w; -void (*callback)(); -char *cb_arg; +int DSA_is_prime(BIGNUM *w, void (*callback)(), char *cb_arg) { int ok= -1,j,i,n; BN_CTX *ctx=NULL,*ctx2=NULL; diff --git a/crypto/dsa/dsa_key.c b/crypto/dsa/dsa_key.c index d51ed9395f..21ed0f65e0 100644 --- a/crypto/dsa/dsa_key.c +++ b/crypto/dsa/dsa_key.c @@ -64,8 +64,7 @@ #include "dsa.h" #include "rand.h" -int DSA_generate_key(dsa) -DSA *dsa; +int DSA_generate_key(DSA *dsa) { int ok=0; unsigned int i; diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c index 9692670e80..1bd89ae4c3 100644 --- a/crypto/dsa/dsa_lib.c +++ b/crypto/dsa/dsa_lib.c @@ -66,7 +66,7 @@ const char *DSA_version="DSA" OPENSSL_VERSION_PTEXT; -DSA *DSA_new() +DSA *DSA_new(void) { DSA *ret; @@ -95,8 +95,7 @@ DSA *DSA_new() return(ret); } -void DSA_free(r) -DSA *r; +void DSA_free(DSA *r) { int i; @@ -127,8 +126,7 @@ DSA *r; Free(r); } -int DSA_size(r) -DSA *r; +int DSA_size(DSA *r) { int ret,i; ASN1_INTEGER bs; diff --git a/crypto/dsa/dsa_sign.c b/crypto/dsa/dsa_sign.c index 92098e2149..9ceaceb632 100644 --- a/crypto/dsa/dsa_sign.c +++ b/crypto/dsa/dsa_sign.c @@ -65,10 +65,7 @@ #include "rand.h" #include "asn1.h" -DSA_SIG * DSA_do_sign(dgst,dlen,dsa) -unsigned char *dgst; -int dlen; -DSA *dsa; +DSA_SIG * DSA_do_sign(unsigned char *dgst, int dlen, DSA *dsa) { BIGNUM *kinv=NULL,*r=NULL,*s=NULL; BIGNUM m; @@ -133,13 +130,10 @@ err: /* data has already been hashed (probably with SHA or SHA-1). */ -int DSA_sign(type,dgst,dlen,sig,siglen,dsa) -int type; -unsigned char *dgst; -int dlen; -unsigned char *sig; /* out */ -unsigned int *siglen; /* out */ -DSA *dsa; +/* unsigned char *sig: out */ +/* unsigned int *siglen: out */ +int DSA_sign(int type, unsigned char *dgst, int dlen, unsigned char *sig, + unsigned int *siglen, DSA *dsa) { DSA_SIG *s; s=DSA_do_sign(dgst,dlen,dsa); @@ -153,11 +147,7 @@ DSA *dsa; return(1); } -int DSA_sign_setup(dsa,ctx_in,kinvp,rp) -DSA *dsa; -BN_CTX *ctx_in; -BIGNUM **kinvp; -BIGNUM **rp; +int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) { BN_CTX *ctx; BIGNUM k,*kinv=NULL,*r=NULL; diff --git a/crypto/dsa/dsa_vrf.c b/crypto/dsa/dsa_vrf.c index 3b74c81a57..24ede6762e 100644 --- a/crypto/dsa/dsa_vrf.c +++ b/crypto/dsa/dsa_vrf.c @@ -66,11 +66,7 @@ #include "asn1.h" #include "asn1_mac.h" -int DSA_do_verify(dgst,dgst_len,sig,dsa) -unsigned char *dgst; -int dgst_len; -DSA_SIG *sig; -DSA *dsa; +int DSA_do_verify(unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa) { BN_CTX *ctx; BIGNUM u1,u2,t1; @@ -147,13 +143,8 @@ DSA *dsa; * 0: incorrect signature * -1: error */ -int DSA_verify(type,dgst,dgst_len,sigbuf,siglen,dsa) -int type; -unsigned char *dgst; -int dgst_len; -unsigned char *sigbuf; -int siglen; -DSA *dsa; +int DSA_verify(int type, unsigned char *dgst, int dgst_len, + unsigned char *sigbuf, int siglen, DSA *dsa) { DSA_SIG *s; int ret=-1; diff --git a/crypto/dsa/dsagen.c b/crypto/dsa/dsagen.c index 20335de250..ce08d10353 100644 --- a/crypto/dsa/dsagen.c +++ b/crypto/dsa/dsagen.c @@ -77,8 +77,7 @@ unsigned char seed[20]={ 0xe0,0x42,0x7d,LAST_VALUE}; #endif -int cb(p,n) -int p,n; +int cb(int p, int n) { char c='*'; diff --git a/crypto/dsa/dsatest.c b/crypto/dsa/dsatest.c index 924380a44b..4018f81862 100644 --- a/crypto/dsa/dsatest.c +++ b/crypto/dsa/dsatest.c @@ -117,9 +117,7 @@ static unsigned char out_g[]={ static BIO *bio_err=NULL; -int main(argc, argv) -int argc; -char **argv; +int main(int argc, char **argv) { DSA *dsa=NULL; int counter,ret=0,i,j; @@ -193,10 +191,7 @@ end: return(0); } -static void MS_CALLBACK dsa_cb(p, n, arg) -int p; -int n; -char *arg; +static void MS_CALLBACK dsa_cb(int p, int n, char *arg) { char c='*'; static int ok=0,num=0; |