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/dh | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) |
Change functions to ANSI C.
Diffstat (limited to 'crypto/dh')
-rw-r--r-- | crypto/dh/dh_check.c | 4 | ||||
-rw-r--r-- | crypto/dh/dh_err.c | 2 | ||||
-rw-r--r-- | crypto/dh/dh_gen.c | 7 | ||||
-rw-r--r-- | crypto/dh/dh_key.c | 8 | ||||
-rw-r--r-- | crypto/dh/dh_lib.c | 8 | ||||
-rw-r--r-- | crypto/dh/dhtest.c | 9 |
6 files changed, 11 insertions, 27 deletions
diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c index 65602e494f..e631f60718 100644 --- a/crypto/dh/dh_check.c +++ b/crypto/dh/dh_check.c @@ -70,9 +70,7 @@ * should hold. */ -int DH_check(dh,ret) -DH *dh; -int *ret; +int DH_check(DH *dh, int *ret) { int ok=0; BN_CTX *ctx=NULL; diff --git a/crypto/dh/dh_err.c b/crypto/dh/dh_err.c index 83ad45fb04..5c1a129414 100644 --- a/crypto/dh/dh_err.c +++ b/crypto/dh/dh_err.c @@ -80,7 +80,7 @@ static ERR_STRING_DATA DH_str_reasons[]= #endif -void ERR_load_DH_strings() +void ERR_load_DH_strings(void) { static int init=1; diff --git a/crypto/dh/dh_gen.c b/crypto/dh/dh_gen.c index 466f2bf06f..fc577af05d 100644 --- a/crypto/dh/dh_gen.c +++ b/crypto/dh/dh_gen.c @@ -83,11 +83,8 @@ * this generator function can take a very very long time to run. */ -DH *DH_generate_parameters(prime_len,generator,callback,cb_arg) -int prime_len; -int generator; -void (*callback)(P_I_I_P); -char *cb_arg; +DH *DH_generate_parameters(int prime_len, int generator, + void (*callback)(P_I_I_P), char *cb_arg) { BIGNUM *p=NULL,*t1,*t2; DH *ret=NULL; diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c index fa2c96082b..25cc635e6d 100644 --- a/crypto/dh/dh_key.c +++ b/crypto/dh/dh_key.c @@ -62,8 +62,7 @@ #include "rand.h" #include "dh.h" -int DH_generate_key(dh) -DH *dh; +int DH_generate_key(DH *dh) { int ok=0; unsigned int i; @@ -119,10 +118,7 @@ err: return(ok); } -int DH_compute_key(key,pub_key,dh) -unsigned char *key; -BIGNUM *pub_key; -DH *dh; +int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh) { BN_CTX ctx; BN_MONT_CTX *mont; diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index d18484cf41..12b40cd1a4 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -63,7 +63,7 @@ const char *DH_version="Diffie-Hellman" OPENSSL_VERSION_PTEXT; -DH *DH_new() +DH *DH_new(void) { DH *ret; @@ -85,8 +85,7 @@ DH *DH_new() return(ret); } -void DH_free(r) -DH *r; +void DH_free(DH *r) { if(r == NULL) return; if (r->p != NULL) BN_clear_free(r->p); @@ -98,8 +97,7 @@ DH *r; Free(r); } -int DH_size(dh) -DH *dh; +int DH_size(DH *dh) { return(BN_num_bytes(dh->p)); } diff --git a/crypto/dh/dhtest.c b/crypto/dh/dhtest.c index e8e1695edd..249a2ecc09 100644 --- a/crypto/dh/dhtest.c +++ b/crypto/dh/dhtest.c @@ -86,9 +86,7 @@ static void MS_CALLBACK cb(); BIO *out=NULL; -int main(argc,argv) -int argc; -char *argv[]; +int main(int argc, char *argv[]) { DH *a,*b; char buf[12]; @@ -170,10 +168,7 @@ err: return(ret); } -static void MS_CALLBACK cb(p, n,arg) -int p; -int n; -char *arg; +static void MS_CALLBACK cb(int p, int n, char *arg) { char c='*'; |