diff options
Diffstat (limited to 'crypto/evp')
61 files changed, 302 insertions, 707 deletions
diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c index 73172b9a07..a680064200 100644 --- a/crypto/evp/bio_b64.c +++ b/crypto/evp/bio_b64.c @@ -113,13 +113,12 @@ static BIO_METHOD methods_b64= b64_free, }; -BIO_METHOD *BIO_f_base64() +BIO_METHOD *BIO_f_base64(void) { return(&methods_b64); } -static int b64_new(bi) -BIO *bi; +static int b64_new(BIO *bi) { BIO_B64_CTX *ctx; @@ -140,8 +139,7 @@ BIO *bi; return(1); } -static int b64_free(a) -BIO *a; +static int b64_free(BIO *a) { if (a == NULL) return(0); Free(a->ptr); @@ -151,10 +149,7 @@ BIO *a; return(1); } -static int b64_read(b,out,outl) -BIO *b; -char *out; -int outl; +static int b64_read(BIO *b, char *out, int outl) { int ret=0,i,ii,j,k,x,n,num,ret_code=0; BIO_B64_CTX *ctx; @@ -354,10 +349,7 @@ int outl; return((ret == 0)?ret_code:ret); } -static int b64_write(b,in,inl) -BIO *b; -char *in; -int inl; +static int b64_write(BIO *b, char *in, int inl) { int ret=inl,n,i; BIO_B64_CTX *ctx; @@ -451,11 +443,7 @@ int inl; return(ret); } -static long b64_ctrl(b,cmd,num,ptr) -BIO *b; -int cmd; -long num; -char *ptr; +static long b64_ctrl(BIO *b, int cmd, long num, char *ptr) { BIO_B64_CTX *ctx; long ret=1; diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index e1443d684d..d83e1fd137 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -105,13 +105,12 @@ static BIO_METHOD methods_enc= enc_free, }; -BIO_METHOD *BIO_f_cipher() +BIO_METHOD *BIO_f_cipher(void) { return(&methods_enc); } -static int enc_new(bi) -BIO *bi; +static int enc_new(BIO *bi) { BIO_ENC_CTX *ctx; @@ -131,8 +130,7 @@ BIO *bi; return(1); } -static int enc_free(a) -BIO *a; +static int enc_free(BIO *a) { BIO_ENC_CTX *b; @@ -147,10 +145,7 @@ BIO *a; return(1); } -static int enc_read(b,out,outl) -BIO *b; -char *out; -int outl; +static int enc_read(BIO *b, char *out, int outl) { int ret=0,i; BIO_ENC_CTX *ctx; @@ -230,10 +225,7 @@ int outl; return((ret == 0)?ctx->cont:ret); } -static int enc_write(b,in,inl) -BIO *b; -char *in; -int inl; +static int enc_write(BIO *b, char *in, int inl) { int ret=0,n,i; BIO_ENC_CTX *ctx; @@ -288,11 +280,7 @@ int inl; return(ret); } -static long enc_ctrl(b,cmd,num,ptr) -BIO *b; -int cmd; -long num; -char *ptr; +static long enc_ctrl(BIO *b, int cmd, long num, char *ptr) { BIO *dbio; BIO_ENC_CTX *ctx,*dctx; @@ -403,12 +391,8 @@ EVP_CIPHER_ctx *c; } */ -void BIO_set_cipher(b,c,k,i,e) -BIO *b; -const EVP_CIPHER *c; -unsigned char *k; -unsigned char *i; -int e; +void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, unsigned char *k, + unsigned char *i, int e) { BIO_ENC_CTX *ctx; diff --git a/crypto/evp/bio_md.c b/crypto/evp/bio_md.c index 51dd1aa0c9..78c4c1f4ed 100644 --- a/crypto/evp/bio_md.c +++ b/crypto/evp/bio_md.c @@ -95,13 +95,12 @@ static BIO_METHOD methods_md= md_free, }; -BIO_METHOD *BIO_f_md() +BIO_METHOD *BIO_f_md(void) { return(&methods_md); } -static int md_new(bi) -BIO *bi; +static int md_new(BIO *bi) { EVP_MD_CTX *ctx; @@ -114,8 +113,7 @@ BIO *bi; return(1); } -static int md_free(a) -BIO *a; +static int md_free(BIO *a) { if (a == NULL) return(0); Free(a->ptr); @@ -125,10 +123,7 @@ BIO *a; return(1); } -static int md_read(b,out,outl) -BIO *b; -char *out; -int outl; +static int md_read(BIO *b, char *out, int outl) { int ret=0; EVP_MD_CTX *ctx; @@ -152,10 +147,7 @@ int outl; return(ret); } -static int md_write(b,in,inl) -BIO *b; -char *in; -int inl; +static int md_write(BIO *b, char *in, int inl) { int ret=0; EVP_MD_CTX *ctx; @@ -178,11 +170,7 @@ int inl; return(ret); } -static long md_ctrl(b,cmd,num,ptr) -BIO *b; -int cmd; -long num; -char *ptr; +static long md_ctrl(BIO *b, int cmd, long num, char *ptr) { EVP_MD_CTX *ctx,*dctx,**pctx; const EVP_MD **ppmd; @@ -243,10 +231,7 @@ char *ptr; return(ret); } -static int md_gets(bp,buf,size) -BIO *bp; -char *buf; -int size; +static int md_gets(BIO *bp, char *buf, int size) { EVP_MD_CTX *ctx; unsigned int ret; diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c index 09ce86f3ce..183835b0b1 100644 --- a/crypto/evp/bio_ok.c +++ b/crypto/evp/bio_ok.c @@ -188,13 +188,12 @@ static BIO_METHOD methods_ok= ok_free, }; -BIO_METHOD *BIO_f_reliable() +BIO_METHOD *BIO_f_reliable(void) { return(&methods_ok); } -static int ok_new(bi) -BIO *bi; +static int ok_new(BIO *bi) { BIO_OK_CTX *ctx; @@ -216,8 +215,7 @@ BIO *bi; return(1); } -static int ok_free(a) -BIO *a; +static int ok_free(BIO *a) { if (a == NULL) return(0); memset(a->ptr,0,sizeof(BIO_OK_CTX)); @@ -228,10 +226,7 @@ BIO *a; return(1); } -static int ok_read(b,out,outl) -BIO *b; -char *out; -int outl; +static int ok_read(BIO *b, char *out, int outl) { int ret=0,i,n; BIO_OK_CTX *ctx; @@ -302,10 +297,7 @@ int outl; return(ret); } -static int ok_write(b,in,inl) -BIO *b; -char *in; -int inl; +static int ok_write(BIO *b, char *in, int inl) { int ret=0,n,i; BIO_OK_CTX *ctx; @@ -363,11 +355,7 @@ int inl; return(ret); } -static long ok_ctrl(b,cmd,num,ptr) -BIO *b; -int cmd; -long num; -char *ptr; +static long ok_ctrl(BIO *b, int cmd, long num, char *ptr) { BIO_OK_CTX *ctx; EVP_MD *md; diff --git a/crypto/evp/c_all.c b/crypto/evp/c_all.c index 51f7aba805..edaeda8598 100644 --- a/crypto/evp/c_all.c +++ b/crypto/evp/c_all.c @@ -62,13 +62,13 @@ #include "pkcs12.h" #include "objects.h" -void SSLeay_add_all_algorithms() +void SSLeay_add_all_algorithms(void) { SSLeay_add_all_ciphers(); SSLeay_add_all_digests(); } -void SSLeay_add_all_ciphers() +void SSLeay_add_all_ciphers(void) { #ifndef NO_DES EVP_add_cipher(EVP_des_cfb()); @@ -153,7 +153,7 @@ void SSLeay_add_all_ciphers() } -void SSLeay_add_all_digests() +void SSLeay_add_all_digests(void) { #ifndef NO_MD2 EVP_add_digest(EVP_md2()); diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index 0704827be1..c2c603ea63 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -61,26 +61,19 @@ #include "objects.h" #include "evp.h" -void EVP_DigestInit(ctx,type) -EVP_MD_CTX *ctx; -const EVP_MD *type; +void EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) { ctx->digest=type; type->init(&(ctx->md)); } -void EVP_DigestUpdate(ctx,data,count) -EVP_MD_CTX *ctx; -const unsigned char *data; -unsigned int count; +void EVP_DigestUpdate(EVP_MD_CTX *ctx, const unsigned char *data, + unsigned int count) { ctx->digest->update(&(ctx->md.base[0]),data,(unsigned long)count); } -void EVP_DigestFinal(ctx,md,size) -EVP_MD_CTX *ctx; -unsigned char *md; -unsigned int *size; +void EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) { ctx->digest->final(md,&(ctx->md.base[0])); if (size != NULL) diff --git a/crypto/evp/e_cbc_3d.c b/crypto/evp/e_cbc_3d.c index 907e2e94b0..f68f02b122 100644 --- a/crypto/evp/e_cbc_3d.c +++ b/crypto/evp/e_cbc_3d.c @@ -100,21 +100,18 @@ static EVP_CIPHER d_cbc_ede_cipher3= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_des_ede_cbc() +EVP_CIPHER *EVP_des_ede_cbc(void) { return(&d_cbc_ede_cipher2); } -EVP_CIPHER *EVP_des_ede3_cbc() +EVP_CIPHER *EVP_des_ede3_cbc(void) { return(&d_cbc_ede_cipher3); } -static void des_cbc_ede_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_cbc_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -130,11 +127,8 @@ int enc; } } -static void des_cbc_ede3_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_cbc_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -148,11 +142,8 @@ int enc; } } -static void des_cbc_ede_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void des_cbc_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { des_ede3_cbc_encrypt(in,out,inl, ctx->c.des_ede.ks1, ctx->c.des_ede.ks2,ctx->c.des_ede.ks3, diff --git a/crypto/evp/e_cbc_bf.c b/crypto/evp/e_cbc_bf.c index be605f4a13..1125ca5270 100644 --- a/crypto/evp/e_cbc_bf.c +++ b/crypto/evp/e_cbc_bf.c @@ -86,16 +86,13 @@ static EVP_CIPHER bfish_cbc_cipher= EVP_CIPHER_set_asn1_iv, }; -EVP_CIPHER *EVP_bf_cbc() +EVP_CIPHER *EVP_bf_cbc(void) { return(&bfish_cbc_cipher); } -static void bf_cbc_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void bf_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -104,11 +101,8 @@ int enc; BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); } -static void bf_cbc_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { BF_cbc_encrypt( in,out,(long)inl, diff --git a/crypto/evp/e_cbc_c.c b/crypto/evp/e_cbc_c.c index b50c7874b3..8f0eb5aed7 100644 --- a/crypto/evp/e_cbc_c.c +++ b/crypto/evp/e_cbc_c.c @@ -86,16 +86,13 @@ static EVP_CIPHER cast5_cbc_cipher= EVP_CIPHER_set_asn1_iv, }; -EVP_CIPHER *EVP_cast5_cbc() +EVP_CIPHER *EVP_cast5_cbc(void) { return(&cast5_cbc_cipher); } -static void cast_cbc_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void cast_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -104,11 +101,8 @@ int enc; CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); } -static void cast_cbc_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void cast_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { CAST_cbc_encrypt( in,out,(long)inl, diff --git a/crypto/evp/e_cbc_d.c b/crypto/evp/e_cbc_d.c index f18c8c7e07..eb7a24f3cf 100644 --- a/crypto/evp/e_cbc_d.c +++ b/crypto/evp/e_cbc_d.c @@ -84,16 +84,13 @@ static EVP_CIPHER d_cbc_cipher= EVP_CIPHER_set_asn1_iv, }; -EVP_CIPHER *EVP_des_cbc() +EVP_CIPHER *EVP_des_cbc(void) { return(&d_cbc_cipher); } -static void des_cbc_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -102,11 +99,8 @@ int enc; des_set_key(key,ctx->c.des_ks); } -static void des_cbc_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { des_ncbc_encrypt(in,out,inl,ctx->c.des_ks,&(ctx->iv[0]),ctx->encrypt); } diff --git a/crypto/evp/e_cbc_i.c b/crypto/evp/e_cbc_i.c index 312ffcb721..be7461cda1 100644 --- a/crypto/evp/e_cbc_i.c +++ b/crypto/evp/e_cbc_i.c @@ -86,16 +86,13 @@ static EVP_CIPHER i_cbc_cipher= EVP_CIPHER_set_asn1_iv, }; -EVP_CIPHER *EVP_idea_cbc() +EVP_CIPHER *EVP_idea_cbc(void) { return(&i_cbc_cipher); } -static void idea_cbc_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void idea_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -116,11 +113,8 @@ int enc; } } -static void idea_cbc_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void idea_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { idea_cbc_encrypt( in,out,(long)inl, diff --git a/crypto/evp/e_cbc_r2.c b/crypto/evp/e_cbc_r2.c index 57d46129b6..b30ff66592 100644 --- a/crypto/evp/e_cbc_r2.c +++ b/crypto/evp/e_cbc_r2.c @@ -126,26 +126,23 @@ static EVP_CIPHER r2_40_cbc_cipher= rc2_get_asn1_type_and_iv, }; -EVP_CIPHER *EVP_rc2_cbc() +EVP_CIPHER *EVP_rc2_cbc(void) { return(&r2_cbc_cipher); } -EVP_CIPHER *EVP_rc2_64_cbc() +EVP_CIPHER *EVP_rc2_64_cbc(void) { return(&r2_64_cbc_cipher); } -EVP_CIPHER *EVP_rc2_40_cbc() +EVP_CIPHER *EVP_rc2_40_cbc(void) { return(&r2_40_cbc_cipher); } -static void rc2_cbc_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -155,11 +152,8 @@ int enc; key,EVP_CIPHER_CTX_key_length(ctx)*8); } -static void rc2_cbc_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { RC2_cbc_encrypt( in,out,(long)inl, @@ -167,8 +161,7 @@ unsigned int inl; ctx->encrypt); } -static int rc2_meth_to_magic(e) -const EVP_CIPHER *e; +static int rc2_meth_to_magic(const EVP_CIPHER *e) { int i; @@ -179,8 +172,7 @@ const EVP_CIPHER *e; else return(0); } -static EVP_CIPHER *rc2_magic_to_meth(i) -int i; +static EVP_CIPHER *rc2_magic_to_meth(int i) { if (i == RC2_128_MAGIC) return(EVP_rc2_cbc()); else if (i == RC2_64_MAGIC) return(EVP_rc2_64_cbc()); @@ -192,9 +184,7 @@ int i; } } -static int rc2_get_asn1_type_and_iv(c,type) -EVP_CIPHER_CTX *c; -ASN1_TYPE *type; +static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) { long num=0; int i=0,l; @@ -220,9 +210,7 @@ ASN1_TYPE *type; return(i); } -static int rc2_set_asn1_type_and_iv(c,type) -EVP_CIPHER_CTX *c; -ASN1_TYPE *type; +static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) { long num; int i=0,j; diff --git a/crypto/evp/e_cbc_r5.c b/crypto/evp/e_cbc_r5.c index f7d46ca91f..93aa22e457 100644 --- a/crypto/evp/e_cbc_r5.c +++ b/crypto/evp/e_cbc_r5.c @@ -86,16 +86,13 @@ static EVP_CIPHER rc5_32_12_16_cbc_cipher= NULL, }; -EVP_CIPHER *EVP_rc5_32_12_16_cbc() +EVP_CIPHER *EVP_rc5_32_12_16_cbc(void) { return(&rc5_32_12_16_cbc_cipher); } -static void r_32_12_16_cbc_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -105,11 +102,8 @@ int enc; key,RC5_12_ROUNDS); } -static void r_32_12_16_cbc_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { RC5_32_cbc_encrypt( in,out,(long)inl, diff --git a/crypto/evp/e_cfb_3d.c b/crypto/evp/e_cfb_3d.c index 88ace5c543..e1fc9751e4 100644 --- a/crypto/evp/e_cfb_3d.c +++ b/crypto/evp/e_cfb_3d.c @@ -100,21 +100,18 @@ static EVP_CIPHER d_ede3_cfb_cipher3= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_des_ede_cfb() +EVP_CIPHER *EVP_des_ede_cfb(void) { return(&d_ede_cfb_cipher2); } -EVP_CIPHER *EVP_des_ede3_cfb() +EVP_CIPHER *EVP_des_ede3_cfb(void) { return(&d_ede3_cfb_cipher3); } -static void des_ede_cfb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_ede_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -131,11 +128,8 @@ int enc; } } -static void des_ede3_cfb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_ede3_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -150,11 +144,8 @@ int enc; } } -static void des_ede_cfb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { des_ede3_cfb64_encrypt(in,out,(long)inl, ctx->c.des_ede.ks1, diff --git a/crypto/evp/e_cfb_bf.c b/crypto/evp/e_cfb_bf.c index 8aba2564b8..ca13c8b839 100644 --- a/crypto/evp/e_cfb_bf.c +++ b/crypto/evp/e_cfb_bf.c @@ -86,16 +86,13 @@ static EVP_CIPHER bfish_cfb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_bf_cfb() +EVP_CIPHER *EVP_bf_cfb(void) { return(&bfish_cfb_cipher); } -static void bf_cfb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -106,11 +103,8 @@ int enc; BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); } -static void bf_cfb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { BF_cfb64_encrypt( in,out, diff --git a/crypto/evp/e_cfb_c.c b/crypto/evp/e_cfb_c.c index 936df55fd8..3bfdeba403 100644 --- a/crypto/evp/e_cfb_c.c +++ b/crypto/evp/e_cfb_c.c @@ -86,16 +86,13 @@ static EVP_CIPHER cast5_cfb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_cast5_cfb() +EVP_CIPHER *EVP_cast5_cfb(void) { return(&cast5_cfb_cipher); } -static void cast_cfb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -106,11 +103,8 @@ int enc; CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); } -static void cast_cfb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { CAST_cfb64_encrypt( in,out, diff --git a/crypto/evp/e_cfb_d.c b/crypto/evp/e_cfb_d.c index 554815ec8a..08fad964a4 100644 --- a/crypto/evp/e_cfb_d.c +++ b/crypto/evp/e_cfb_d.c @@ -84,16 +84,13 @@ static EVP_CIPHER d_cfb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_des_cfb() +EVP_CIPHER *EVP_des_cfb(void) { return(&d_cfb_cipher); } -static void des_cfb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -104,11 +101,8 @@ int enc; des_set_key(key,ctx->c.des_ks); } -static void des_cfb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { des_cfb64_encrypt( in,out, diff --git a/crypto/evp/e_cfb_i.c b/crypto/evp/e_cfb_i.c index 9225efaa86..85e791fafe 100644 --- a/crypto/evp/e_cfb_i.c +++ b/crypto/evp/e_cfb_i.c @@ -86,16 +86,13 @@ static EVP_CIPHER i_cfb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_idea_cfb() +EVP_CIPHER *EVP_idea_cfb(void) { return(&i_cfb_cipher); } -static void idea_cfb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void idea_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -106,11 +103,8 @@ int enc; idea_set_encrypt_key(key,&(ctx->c.idea_ks)); } -static void idea_cfb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void idea_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { idea_cfb64_encrypt( in,out,(long)inl, diff --git a/crypto/evp/e_cfb_r2.c b/crypto/evp/e_cfb_r2.c index 849be7e638..78b9f4c147 100644 --- a/crypto/evp/e_cfb_r2.c +++ b/crypto/evp/e_cfb_r2.c @@ -86,16 +86,13 @@ static EVP_CIPHER r2_cfb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_rc2_cfb() +EVP_CIPHER *EVP_rc2_cfb(void) { return(&r2_cfb_cipher); } -static void rc2_cfb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void rc2_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -107,11 +104,8 @@ int enc; key,EVP_CIPHER_CTX_key_length(ctx)*8); } -static void rc2_cfb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void rc2_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { RC2_cfb64_encrypt( in,out, diff --git a/crypto/evp/e_cfb_r5.c b/crypto/evp/e_cfb_r5.c index a2fddaedc0..6031ffc769 100644 --- a/crypto/evp/e_cfb_r5.c +++ b/crypto/evp/e_cfb_r5.c @@ -86,16 +86,13 @@ static EVP_CIPHER rc5_cfb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_rc5_32_12_16_cfb() +EVP_CIPHER *EVP_rc5_32_12_16_cfb(void) { return(&rc5_cfb_cipher); } -static void rc5_32_12_16_cfb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void rc5_32_12_16_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -107,11 +104,8 @@ int enc; RC5_12_ROUNDS); } -static void rc5_32_12_16_cfb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void rc5_32_12_16_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { RC5_32_cfb64_encrypt( in,out, diff --git a/crypto/evp/e_ecb_3d.c b/crypto/evp/e_ecb_3d.c index 13d7611bb3..bb4e1b3831 100644 --- a/crypto/evp/e_ecb_3d.c +++ b/crypto/evp/e_ecb_3d.c @@ -99,21 +99,18 @@ static EVP_CIPHER d_ede3_cipher3= NULL, }; -EVP_CIPHER *EVP_des_ede() +EVP_CIPHER *EVP_des_ede(void) { return(&d_ede_cipher2); } -EVP_CIPHER *EVP_des_ede3() +EVP_CIPHER *EVP_des_ede3(void) { return(&d_ede3_cipher3); } -static void des_ede_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (key != NULL) { @@ -125,11 +122,8 @@ int enc; } } -static void des_ede3_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (key != NULL) { @@ -139,11 +133,8 @@ int enc; } } -static void des_ede_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void des_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { unsigned int i; diff --git a/crypto/evp/e_ecb_bf.c b/crypto/evp/e_ecb_bf.c index 142a9d3123..09c8a8ba45 100644 --- a/crypto/evp/e_ecb_bf.c +++ b/crypto/evp/e_ecb_bf.c @@ -86,26 +86,20 @@ static EVP_CIPHER bfish_ecb_cipher= NULL, }; -EVP_CIPHER *EVP_bf_ecb() +EVP_CIPHER *EVP_bf_ecb(void) { return(&bfish_ecb_cipher); } -static void bf_ecb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (key != NULL) BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); } -static void bf_ecb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { unsigned int i; diff --git a/crypto/evp/e_ecb_c.c b/crypto/evp/e_ecb_c.c index 34e0c18296..bd408ce535 100644 --- a/crypto/evp/e_ecb_c.c +++ b/crypto/evp/e_ecb_c.c @@ -86,26 +86,20 @@ static EVP_CIPHER cast5_ecb_cipher= NULL, }; -EVP_CIPHER *EVP_cast5_ecb() +EVP_CIPHER *EVP_cast5_ecb(void) { return(&cast5_ecb_cipher); } -static void cast_ecb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (key != NULL) CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); } -static void cast_ecb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { unsigned int i; diff --git a/crypto/evp/e_ecb_d.c b/crypto/evp/e_ecb_d.c index de3aff5ce2..930bad5c8a 100644 --- a/crypto/evp/e_ecb_d.c +++ b/crypto/evp/e_ecb_d.c @@ -84,26 +84,20 @@ static EVP_CIPHER d_ecb_cipher= NULL, }; -EVP_CIPHER *EVP_des_ecb() +EVP_CIPHER *EVP_des_ecb(void) { return(&d_ecb_cipher); } -static void des_ecb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (key != NULL) des_set_key(key,ctx->c.des_ks); } -static void des_ecb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { unsigned int i; diff --git a/crypto/evp/e_ecb_i.c b/crypto/evp/e_ecb_i.c index e24022a12c..28934917e1 100644 --- a/crypto/evp/e_ecb_i.c +++ b/crypto/evp/e_ecb_i.c @@ -86,16 +86,13 @@ static EVP_CIPHER i_ecb_cipher= NULL, }; -EVP_CIPHER *EVP_idea_ecb() +EVP_CIPHER *EVP_idea_ecb(void) { return(&i_ecb_cipher); } -static void idea_ecb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void idea_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (key != NULL) { @@ -113,11 +110,8 @@ int enc; } } -static void idea_ecb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { unsigned int i; diff --git a/crypto/evp/e_ecb_r2.c b/crypto/evp/e_ecb_r2.c index 4e74af96bd..f052b181d0 100644 --- a/crypto/evp/e_ecb_r2.c +++ b/crypto/evp/e_ecb_r2.c @@ -86,27 +86,21 @@ static EVP_CIPHER r2_ecb_cipher= NULL, }; -EVP_CIPHER *EVP_rc2_ecb() +EVP_CIPHER *EVP_rc2_ecb(void) { return(&r2_ecb_cipher); } -static void rc2_ecb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void rc2_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (key != NULL) RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx), key,EVP_CIPHER_CTX_key_length(ctx)*8); } -static void rc2_ecb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void rc2_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { unsigned int i; diff --git a/crypto/evp/e_ecb_r5.c b/crypto/evp/e_ecb_r5.c index 08f4a82651..2c3203d438 100644 --- a/crypto/evp/e_ecb_r5.c +++ b/crypto/evp/e_ecb_r5.c @@ -86,27 +86,21 @@ static EVP_CIPHER rc5_ecb_cipher= NULL, }; -EVP_CIPHER *EVP_rc5_32_12_16_ecb() +EVP_CIPHER *EVP_rc5_32_12_16_ecb(void) { return(&rc5_ecb_cipher); } -static void rc5_32_12_16_ecb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void rc5_32_12_16_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (key != NULL) RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key, RC5_12_ROUNDS); } -static void rc5_32_12_16_ecb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void rc5_32_12_16_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { unsigned int i; diff --git a/crypto/evp/e_null.c b/crypto/evp/e_null.c index e4e7ca7606..374b01c88b 100644 --- a/crypto/evp/e_null.c +++ b/crypto/evp/e_null.c @@ -83,25 +83,19 @@ static EVP_CIPHER n_cipher= NULL, }; -EVP_CIPHER *EVP_enc_null() +EVP_CIPHER *EVP_enc_null(void) { return(&n_cipher); } -static void null_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { memset(&(ctx->c),0,sizeof(ctx->c)); } -static void null_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { if (in != out) memcpy((char *)out,(char *)in,(int)inl); diff --git a/crypto/evp/e_ofb_3d.c b/crypto/evp/e_ofb_3d.c index a3981288f1..8d42f16719 100644 --- a/crypto/evp/e_ofb_3d.c +++ b/crypto/evp/e_ofb_3d.c @@ -100,21 +100,18 @@ static EVP_CIPHER d_ede3_ofb_cipher3= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_des_ede_ofb() +EVP_CIPHER *EVP_des_ede_ofb(void) { return(&d_ede_ofb_cipher2); } -EVP_CIPHER *EVP_des_ede3_ofb() +EVP_CIPHER *EVP_des_ede3_ofb(void) { return(&d_ede3_ofb_cipher3); } -static void des_ede_ofb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_ede_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -131,11 +128,8 @@ int enc; } } -static void des_ede3_ofb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_ede3_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -150,11 +144,8 @@ int enc; } } -static void des_ede_ofb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { des_ede3_ofb64_encrypt(in,out,inl,ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, diff --git a/crypto/evp/e_ofb_bf.c b/crypto/evp/e_ofb_bf.c index 492f9b9082..b1753e60cd 100644 --- a/crypto/evp/e_ofb_bf.c +++ b/crypto/evp/e_ofb_bf.c @@ -86,16 +86,13 @@ static EVP_CIPHER bfish_ofb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_bf_ofb() +EVP_CIPHER *EVP_bf_ofb(void) { return(&bfish_ofb_cipher); } -static void bf_ofb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void bf_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -106,11 +103,8 @@ int enc; BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); } -static void bf_ofb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { BF_ofb64_encrypt( in,out, diff --git a/crypto/evp/e_ofb_c.c b/crypto/evp/e_ofb_c.c index f1eef4469c..fb7b501fb6 100644 --- a/crypto/evp/e_ofb_c.c +++ b/crypto/evp/e_ofb_c.c @@ -86,16 +86,13 @@ static EVP_CIPHER cast5_ofb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_cast5_ofb() +EVP_CIPHER *EVP_cast5_ofb(void) { return(&cast5_ofb_cipher); } -static void cast_ofb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -106,11 +103,8 @@ int enc; CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); } -static void cast_ofb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { CAST_ofb64_encrypt( in,out, diff --git a/crypto/evp/e_ofb_d.c b/crypto/evp/e_ofb_d.c index 30f6e0451c..ae0c793e59 100644 --- a/crypto/evp/e_ofb_d.c +++ b/crypto/evp/e_ofb_d.c @@ -84,16 +84,13 @@ static EVP_CIPHER d_ofb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_des_ofb() +EVP_CIPHER *EVP_des_ofb(void) { return(&d_ofb_cipher); } -static void des_ofb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void des_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -104,11 +101,8 @@ int enc; des_set_key(key,ctx->c.des_ks); } -static void des_ofb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { des_ofb64_encrypt(in,out,inl,ctx->c.des_ks,&(ctx->iv[0]),&ctx->num); } diff --git a/crypto/evp/e_ofb_i.c b/crypto/evp/e_ofb_i.c index 96c8afd9c8..7d68666189 100644 --- a/crypto/evp/e_ofb_i.c +++ b/crypto/evp/e_ofb_i.c @@ -86,16 +86,13 @@ static EVP_CIPHER i_ofb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_idea_ofb() +EVP_CIPHER *EVP_idea_ofb(void) { return(&i_ofb_cipher); } -static void idea_ofb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -106,11 +103,8 @@ int enc; idea_set_encrypt_key(key,&(ctx->c.idea_ks)); } -static void idea_ofb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { idea_ofb64_encrypt( in,out,(long)inl, diff --git a/crypto/evp/e_ofb_r2.c b/crypto/evp/e_ofb_r2.c index 4ed67eacd5..73590a296e 100644 --- a/crypto/evp/e_ofb_r2.c +++ b/crypto/evp/e_ofb_r2.c @@ -86,16 +86,13 @@ static EVP_CIPHER r2_ofb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_rc2_ofb() +EVP_CIPHER *EVP_rc2_ofb(void) { return(&r2_ofb_cipher); } -static void rc2_ofb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void rc2_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -107,11 +104,8 @@ int enc; key,EVP_CIPHER_CTX_key_length(ctx)*8); } -static void rc2_ofb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void rc2_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { RC2_ofb64_encrypt( in,out, diff --git a/crypto/evp/e_ofb_r5.c b/crypto/evp/e_ofb_r5.c index db28d6c317..8cf021988c 100644 --- a/crypto/evp/e_ofb_r5.c +++ b/crypto/evp/e_ofb_r5.c @@ -86,16 +86,13 @@ static EVP_CIPHER rc5_ofb_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_rc5_32_12_16_ofb() +EVP_CIPHER *EVP_rc5_32_12_16_ofb(void) { return(&rc5_ofb_cipher); } -static void rc5_32_12_16_ofb_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void rc5_32_12_16_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { ctx->num=0; @@ -107,11 +104,8 @@ int enc; RC5_12_ROUNDS); } -static void rc5_32_12_16_ofb_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void rc5_32_12_16_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { RC5_32_ofb64_encrypt( in,out, diff --git a/crypto/evp/e_rc4.c b/crypto/evp/e_rc4.c index 7e9790a94c..1552379a49 100644 --- a/crypto/evp/e_rc4.c +++ b/crypto/evp/e_rc4.c @@ -94,21 +94,18 @@ static EVP_CIPHER r4_40_cipher= rc4_cipher, }; -EVP_CIPHER *EVP_rc4() +EVP_CIPHER *EVP_rc4(void) { return(&r4_cipher); } -EVP_CIPHER *EVP_rc4_40() +EVP_CIPHER *EVP_rc4_40(void) { return(&r4_40_cipher); } -static void rc4_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (key != NULL) memcpy(&(ctx->c.rc4.key[0]),key,EVP_CIPHER_CTX_key_length(ctx)); @@ -116,11 +113,8 @@ int enc; ctx->c.rc4.key); } -static void rc4_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { RC4(&(ctx->c.rc4.ks),inl,in,out); } diff --git a/crypto/evp/e_xcbc_d.c b/crypto/evp/e_xcbc_d.c index b0bae80970..e697db73e7 100644 --- a/crypto/evp/e_xcbc_d.c +++ b/crypto/evp/e_xcbc_d.c @@ -84,16 +84,13 @@ static EVP_CIPHER d_xcbc_cipher= EVP_CIPHER_get_asn1_iv, }; -EVP_CIPHER *EVP_desx_cbc() +EVP_CIPHER *EVP_desx_cbc(void) { return(&d_xcbc_cipher); } -static void desx_cbc_init_key(ctx,key,iv,enc) -EVP_CIPHER_CTX *ctx; -unsigned char *key; -unsigned char *iv; -int enc; +static void desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, + unsigned char *iv, int enc) { if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); @@ -106,11 +103,8 @@ int enc; } } -static void desx_cbc_cipher(ctx,out,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -unsigned char *in; -unsigned int inl; +static void desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + unsigned char *in, unsigned int inl) { des_xcbc_encrypt(in,out,inl,ctx->c.desx_cbc.ks, &(ctx->iv[0]), diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c index 14d47c1eed..0fd73f745a 100644 --- a/crypto/evp/encode.c +++ b/crypto/evp/encode.c @@ -110,20 +110,15 @@ static unsigned char data_ascii2bin[128]={ 0x31,0x32,0x33,0xFF,0xFF,0xFF,0xFF,0xFF, }; -void EVP_EncodeInit(ctx) -EVP_ENCODE_CTX *ctx; +void EVP_EncodeInit(EVP_ENCODE_CTX *ctx) { ctx->length=48; ctx->num=0; ctx->line_num=0; } -void EVP_EncodeUpdate(ctx,out,outl,in,inl) -EVP_ENCODE_CTX *ctx; -unsigned char *out; -int *outl; -unsigned char *in; -int inl; +void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, + unsigned char *in, int inl) { int i,j; unsigned int total=0; @@ -165,10 +160,7 @@ int inl; *outl=total; } -void EVP_EncodeFinal(ctx,out,outl) -EVP_ENCODE_CTX *ctx; -unsigned char *out; -int *outl; +void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) { unsigned int ret=0; @@ -182,9 +174,7 @@ int *outl; *outl=ret; } -int EVP_EncodeBlock(t,f,dlen) -unsigned char *t,*f; -int dlen; +int EVP_EncodeBlock(unsigned char *t, unsigned char *f, int dlen) { int i,ret=0; unsigned long l; @@ -218,8 +208,7 @@ int dlen; return(ret); } -void EVP_DecodeInit(ctx) -EVP_ENCODE_CTX *ctx; +void EVP_DecodeInit(EVP_ENCODE_CTX *ctx) { ctx->length=30; ctx->num=0; @@ -231,12 +220,8 @@ EVP_ENCODE_CTX *ctx; * 0 for last line * 1 for full line */ -int EVP_DecodeUpdate(ctx,out,outl,in,inl) -EVP_ENCODE_CTX *ctx; -unsigned char *out; -int *outl; -unsigned char *in; -int inl; +int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, + unsigned char *in, int inl) { int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,tmp2,exp_nl; unsigned char *d; @@ -341,9 +326,7 @@ end: return(rv); } -int EVP_DecodeBlock(t,f,n) -unsigned char *t,*f; -int n; +int EVP_DecodeBlock(unsigned char *t, unsigned char *f, int n) { int i,ret=0,a,b,c,d; unsigned long l; @@ -383,10 +366,7 @@ int n; return(ret); } -int EVP_DecodeFinal(ctx,out,outl) -EVP_ENCODE_CTX *ctx; -unsigned char *out; -int *outl; +int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) { int i; @@ -404,9 +384,7 @@ int *outl; } #ifdef undef -int EVP_DecodeValid(buf,len) -unsigned char *buf; -int len; +int EVP_DecodeValid(unsigned char *buf, int len) { int i,num=0,bad=0; diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 2814e32455..cc7a38120f 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -62,19 +62,14 @@ const char *EVP_version="EVP" OPENSSL_VERSION_PTEXT; -void EVP_CIPHER_CTX_init(ctx) -EVP_CIPHER_CTX *ctx; +void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) { memset(ctx,0,sizeof(EVP_CIPHER_CTX)); /* ctx->cipher=NULL; */ } -void EVP_CipherInit(ctx,data,key,iv,enc) -EVP_CIPHER_CTX *ctx; -const EVP_CIPHER *data; -unsigned char *key; -unsigned char *iv; -int enc; +void EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *data, + unsigned char *key, unsigned char *iv, int enc) { if (enc) EVP_EncryptInit(ctx,data,key,iv); @@ -82,22 +77,15 @@ int enc; EVP_DecryptInit(ctx,data,key,iv); } -void EVP_CipherUpdate(ctx,out,outl,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -int *outl; -unsigned char *in; -int inl; +void EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, + unsigned char *in, int inl) { if (ctx->encrypt) EVP_EncryptUpdate(ctx,out,outl,in,inl); else EVP_DecryptUpdate(ctx,out,outl,in,inl); } -int EVP_CipherFinal(ctx,out,outl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -int *outl; +int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { if (ctx->encrypt) { @@ -107,11 +95,8 @@ int *outl; else return(EVP_DecryptFinal(ctx,out,outl)); } -void EVP_EncryptInit(ctx,cipher,key,iv) -EVP_CIPHER_CTX *ctx; -const EVP_CIPHER *cipher; -unsigned char *key; -unsigned char *iv; +void EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, + unsigned char *key, unsigned char *iv) { if (cipher != NULL) ctx->cipher=cipher; @@ -120,11 +105,8 @@ unsigned char *iv; ctx->buf_len=0; } -void EVP_DecryptInit(ctx,cipher,key,iv) -EVP_CIPHER_CTX *ctx; -const EVP_CIPHER *cipher; -unsigned char *key; -unsigned char *iv; +void EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, + unsigned char *key, unsigned char *iv) { if (cipher != NULL) ctx->cipher=cipher; @@ -134,12 +116,8 @@ unsigned char *iv; } -void EVP_EncryptUpdate(ctx,out,outl,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -int *outl; -unsigned char *in; -int inl; +void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, + unsigned char *in, int inl) { int i,j,bl; @@ -179,10 +157,7 @@ int inl; ctx->buf_len=i; } -void EVP_EncryptFinal(ctx,out,outl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -int *outl; +void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { int i,n,b,bl; @@ -200,12 +175,8 @@ int *outl; *outl=b; } -void EVP_DecryptUpdate(ctx,out,outl,in,inl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -int *outl; -unsigned char *in; -int inl; +void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, + unsigned char *in, int inl) { int b,bl,n; int keep_last=0; @@ -249,10 +220,7 @@ int inl; } } -int EVP_DecryptFinal(ctx,out,outl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -int *outl; +int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { int i,b; int n; @@ -293,8 +261,7 @@ int *outl; return(1); } -void EVP_CIPHER_CTX_cleanup(c) -EVP_CIPHER_CTX *c; +void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) { if ((c->cipher != NULL) && (c->cipher->cleanup != NULL)) c->cipher->cleanup(c); diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c index 2ba53c6baf..04a60881c3 100644 --- a/crypto/evp/evp_err.c +++ b/crypto/evp/evp_err.c @@ -112,7 +112,7 @@ static ERR_STRING_DATA EVP_str_reasons[]= #endif -void ERR_load_EVP_strings() +void ERR_load_EVP_strings(void) { static int init=1; diff --git a/crypto/evp/evp_key.c b/crypto/evp/evp_key.c index b766f73ec1..fd3a3d12a8 100644 --- a/crypto/evp/evp_key.c +++ b/crypto/evp/evp_key.c @@ -65,8 +65,7 @@ /* should be init to zeros. */ static char prompt_string[80]; -void EVP_set_pw_prompt(prompt) -char *prompt; +void EVP_set_pw_prompt(char *prompt) { if (prompt == NULL) prompt_string[0]='\0'; @@ -74,7 +73,7 @@ char *prompt; strncpy(prompt_string,prompt,79); } -char *EVP_get_pw_prompt() +char *EVP_get_pw_prompt(void) { if (prompt_string[0] == '\0') return(NULL); @@ -86,26 +85,16 @@ char *EVP_get_pw_prompt() int des_read_pw_string(char *buf,int len,char *prompt,int verify); #endif -int EVP_read_pw_string(buf,len,prompt,verify) -char *buf; -int len; -const char *prompt; -int verify; +int EVP_read_pw_string(char *buf, int len, const char *prompt, int verify) { if ((prompt == NULL) && (prompt_string[0] != '\0')) prompt=prompt_string; return(des_read_pw_string(buf,len,prompt,verify)); } -int EVP_BytesToKey(type,md,salt,data,datal,count,key,iv) -const EVP_CIPHER *type; -EVP_MD *md; -unsigned char *salt; -unsigned char *data; -int datal; -int count; -unsigned char *key; -unsigned char *iv; +int EVP_BytesToKey(const EVP_CIPHER *type, EVP_MD *md, unsigned char *salt, + unsigned char *data, int datal, int count, unsigned char *key, + unsigned char *iv) { EVP_MD_CTX c; unsigned char md_buf[EVP_MAX_MD_SIZE]; diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c index 729fc8f4e6..22ae261c80 100644 --- a/crypto/evp/evp_lib.c +++ b/crypto/evp/evp_lib.c @@ -61,9 +61,7 @@ #include "evp.h" #include "objects.h" -int EVP_CIPHER_param_to_asn1(c,type) -EVP_CIPHER_CTX *c; -ASN1_TYPE *type; +int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type) { int ret; @@ -74,9 +72,7 @@ ASN1_TYPE *type; return(ret); } -int EVP_CIPHER_asn1_to_param(c,type) -EVP_CIPHER_CTX *c; -ASN1_TYPE *type; +int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type) { int ret; @@ -87,9 +83,7 @@ ASN1_TYPE *type; return(ret); } -int EVP_CIPHER_get_asn1_iv(c,type) -EVP_CIPHER_CTX *c; -ASN1_TYPE *type; +int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) { int i=0,l; @@ -105,9 +99,7 @@ ASN1_TYPE *type; return(i); } -int EVP_CIPHER_set_asn1_iv(c,type) -EVP_CIPHER_CTX *c; -ASN1_TYPE *type; +int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) { int i=0,j; diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c index a905573dec..1418921a04 100644 --- a/crypto/evp/evp_pbe.c +++ b/crypto/evp/evp_pbe.c @@ -74,12 +74,9 @@ EVP_MD *md; EVP_PBE_KEYGEN *keygen; } EVP_PBE_CTL; -int EVP_PBE_CipherInit (pbe_obj, pass, passlen, salt, saltlen, iter, ctx, en_de) -ASN1_OBJECT *pbe_obj; -int passlen, saltlen, iter; -unsigned char *pass, *salt; -EVP_CIPHER_CTX *ctx; -int en_de; +int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, unsigned char *pass, int passlen, + unsigned char *salt, int saltlen, int iter, EVP_CIPHER_CTX *ctx, + int en_de) { EVP_PBE_CTL *pbetmp, pbelu; @@ -112,12 +109,8 @@ int en_de; /* Setup a PBE algorithm but take most parameters from AlgorithmIdentifier */ -int EVP_PBE_ALGOR_CipherInit (algor, pass, passlen, ctx, en_de) -X509_ALGOR *algor; -unsigned char *pass; -int passlen; -EVP_CIPHER_CTX *ctx; -int en_de; +int EVP_PBE_ALGOR_CipherInit (X509_ALGOR *algor, unsigned char *pass, + int passlen, EVP_CIPHER_CTX *ctx, int en_de) { PBEPARAM *pbe; int saltlen, iter; @@ -147,19 +140,15 @@ int en_de; } -static int pbe_cmp (pbe1, pbe2) -EVP_PBE_CTL **pbe1, **pbe2; +static int pbe_cmp (EVP_PBE_CTL **pbe1, EVP_PBE_CTL **pbe2) { return ((*pbe1)->pbe_nid - (*pbe2)->pbe_nid); } /* Add a PBE algorithm */ -int EVP_PBE_alg_add (nid, cipher, md, keygen) -int nid; -EVP_CIPHER *cipher; -EVP_MD *md; -EVP_PBE_KEYGEN *keygen; +int EVP_PBE_alg_add (int nid, EVP_CIPHER *cipher, EVP_MD *md, + EVP_PBE_KEYGEN *keygen) { EVP_PBE_CTL *pbe_tmp; if (!pbe_algs) pbe_algs = sk_new (pbe_cmp); @@ -175,7 +164,7 @@ EVP_PBE_KEYGEN *keygen; return 1; } -void EVP_PBE_cleanup() +void EVP_PBE_cleanup(void) { sk_pop_free(pbe_algs, FreeFunc); } diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c index 0046d8e84b..7ca816823f 100644 --- a/crypto/evp/evp_pkey.c +++ b/crypto/evp/evp_pkey.c @@ -64,8 +64,7 @@ /* Extract a private key from a PKCS8 structure */ -EVP_PKEY *EVP_PKCS82PKEY (p8) -PKCS8_PRIV_KEY_INFO *p8; +EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) { EVP_PKEY *pkey; RSA *rsa; @@ -189,8 +188,7 @@ PKCS8_PRIV_KEY_INFO *p8; /* Turn a private key into a PKCS8 structure */ -PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(pkey) -EVP_PKEY *pkey; +PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey) { PKCS8_PRIV_KEY_INFO *p8; ASN1_INTEGER *dpkey; @@ -263,9 +261,7 @@ EVP_PKEY *pkey; return p8; } -PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(p8, broken) -PKCS8_PRIV_KEY_INFO *p8; -int broken; +PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken) { switch (broken) { diff --git a/crypto/evp/m_dss.c b/crypto/evp/m_dss.c index 3549b1699c..80b4eca136 100644 --- a/crypto/evp/m_dss.c +++ b/crypto/evp/m_dss.c @@ -75,7 +75,7 @@ static EVP_MD dsa_md= sizeof(EVP_MD *)+sizeof(SHA_CTX), }; -EVP_MD *EVP_dss() +EVP_MD *EVP_dss(void) { return(&dsa_md); } diff --git a/crypto/evp/m_dss1.c b/crypto/evp/m_dss1.c index ff256b7b20..2af70fdb60 100644 --- a/crypto/evp/m_dss1.c +++ b/crypto/evp/m_dss1.c @@ -75,7 +75,7 @@ static EVP_MD dss1_md= sizeof(EVP_MD *)+sizeof(SHA_CTX), }; -EVP_MD *EVP_dss1() +EVP_MD *EVP_dss1(void) { return(&dss1_md); } diff --git a/crypto/evp/m_md2.c b/crypto/evp/m_md2.c index 2209416142..fcd3d32de2 100644 --- a/crypto/evp/m_md2.c +++ b/crypto/evp/m_md2.c @@ -75,7 +75,7 @@ static EVP_MD md2_md= sizeof(EVP_MD *)+sizeof(MD2_CTX), }; -EVP_MD *EVP_md2() +EVP_MD *EVP_md2(void) { return(&md2_md); } diff --git a/crypto/evp/m_md5.c b/crypto/evp/m_md5.c index d65db9aa1d..df33608979 100644 --- a/crypto/evp/m_md5.c +++ b/crypto/evp/m_md5.c @@ -75,7 +75,7 @@ static EVP_MD md5_md= sizeof(EVP_MD *)+sizeof(MD5_CTX), }; -EVP_MD *EVP_md5() +EVP_MD *EVP_md5(void) { return(&md5_md); } diff --git a/crypto/evp/m_mdc2.c b/crypto/evp/m_mdc2.c index 64a853eb7f..94abbd4ef0 100644 --- a/crypto/evp/m_mdc2.c +++ b/crypto/evp/m_mdc2.c @@ -75,7 +75,7 @@ static EVP_MD mdc2_md= sizeof(EVP_MD *)+sizeof(MDC2_CTX), }; -EVP_MD *EVP_mdc2() +EVP_MD *EVP_mdc2(void) { return(&mdc2_md); } diff --git a/crypto/evp/m_null.c b/crypto/evp/m_null.c index 6d80560df2..d953672856 100644 --- a/crypto/evp/m_null.c +++ b/crypto/evp/m_null.c @@ -62,7 +62,7 @@ #include "objects.h" #include "x509.h" -static void function() +static void function(void) { } @@ -80,7 +80,7 @@ static EVP_MD null_md= sizeof(EVP_MD *), }; -EVP_MD *EVP_md_null() +EVP_MD *EVP_md_null(void) { return(&null_md); } diff --git a/crypto/evp/m_ripemd.c b/crypto/evp/m_ripemd.c index 04c5d8897b..c3d7492aab 100644 --- a/crypto/evp/m_ripemd.c +++ b/crypto/evp/m_ripemd.c @@ -75,7 +75,7 @@ static EVP_MD ripemd160_md= sizeof(EVP_MD *)+sizeof(RIPEMD160_CTX), }; -EVP_MD *EVP_ripemd160() +EVP_MD *EVP_ripemd160(void) { return(&ripemd160_md); } diff --git a/crypto/evp/m_sha.c b/crypto/evp/m_sha.c index af4e434a22..2b5da3411e 100644 --- a/crypto/evp/m_sha.c +++ b/crypto/evp/m_sha.c @@ -75,7 +75,7 @@ static EVP_MD sha_md= sizeof(EVP_MD *)+sizeof(SHA_CTX), }; -EVP_MD *EVP_sha() +EVP_MD *EVP_sha(void) { return(&sha_md); } diff --git a/crypto/evp/m_sha1.c b/crypto/evp/m_sha1.c index 87135a9cf2..6c4b6aa483 100644 --- a/crypto/evp/m_sha1.c +++ b/crypto/evp/m_sha1.c @@ -75,7 +75,7 @@ static EVP_MD sha1_md= sizeof(EVP_MD *)+sizeof(SHA_CTX), }; -EVP_MD *EVP_sha1() +EVP_MD *EVP_sha1(void) { return(&sha1_md); } diff --git a/crypto/evp/names.c b/crypto/evp/names.c index 124ff8fcd3..250356c844 100644 --- a/crypto/evp/names.c +++ b/crypto/evp/names.c @@ -62,8 +62,7 @@ #include "objects.h" #include "x509.h" -int EVP_add_cipher(c) -EVP_CIPHER *c; +int EVP_add_cipher(EVP_CIPHER *c) { int r; @@ -73,8 +72,7 @@ EVP_CIPHER *c; return(r); } -int EVP_add_digest(md) -EVP_MD *md; +int EVP_add_digest(EVP_MD *md) { int r; const char *name; @@ -96,8 +94,7 @@ EVP_MD *md; return(r); } -const EVP_CIPHER *EVP_get_cipherbyname(name) -const char *name; +const EVP_CIPHER *EVP_get_cipherbyname(const char *name) { const EVP_CIPHER *cp; @@ -105,8 +102,7 @@ const char *name; return(cp); } -const EVP_MD *EVP_get_digestbyname(name) -const char *name; +const EVP_MD *EVP_get_digestbyname(const char *name) { const EVP_MD *cp; @@ -114,7 +110,7 @@ const char *name; return(cp); } -void EVP_cleanup() +void EVP_cleanup(void) { OBJ_NAME_cleanup(OBJ_NAME_TYPE_CIPHER_METH); OBJ_NAME_cleanup(OBJ_NAME_TYPE_MD_METH); diff --git a/crypto/evp/p_dec.c b/crypto/evp/p_dec.c index fca333d78a..0533a84907 100644 --- a/crypto/evp/p_dec.c +++ b/crypto/evp/p_dec.c @@ -66,11 +66,8 @@ #include "objects.h" #include "x509.h" -int EVP_PKEY_decrypt(key,ek,ekl,priv) -unsigned char *key; -unsigned char *ek; -int ekl; -EVP_PKEY *priv; +int EVP_PKEY_decrypt(unsigned char *key, unsigned char *ek, int ekl, + EVP_PKEY *priv) { int ret= -1; diff --git a/crypto/evp/p_enc.c b/crypto/evp/p_enc.c index a902b5ebdf..8d54f1a2f5 100644 --- a/crypto/evp/p_enc.c +++ b/crypto/evp/p_enc.c @@ -66,11 +66,8 @@ #include "objects.h" #include "x509.h" -int EVP_PKEY_encrypt(ek,key,key_len,pubk) -unsigned char *ek; -unsigned char *key; -int key_len; -EVP_PKEY *pubk; +int EVP_PKEY_encrypt(unsigned char *ek, unsigned char *key, int key_len, + EVP_PKEY *pubk) { int ret=0; diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index 581df867da..238dacccdc 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -72,8 +72,7 @@ static void EVP_PKEY_free_it(EVP_PKEY *x); static void EVP_PKEY_free_it(); #endif -int EVP_PKEY_bits(pkey) -EVP_PKEY *pkey; +int EVP_PKEY_bits(EVP_PKEY *pkey) { #ifndef NO_RSA if (pkey->type == EVP_PKEY_RSA) @@ -87,8 +86,7 @@ EVP_PKEY *pkey; return(0); } -int EVP_PKEY_size(pkey) -EVP_PKEY *pkey; +int EVP_PKEY_size(EVP_PKEY *pkey) { if (pkey == NULL) return(0); @@ -104,9 +102,7 @@ EVP_PKEY *pkey; return(0); } -int EVP_PKEY_save_parameters(pkey,mode) -EVP_PKEY *pkey; -int mode; +int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) { #ifndef NO_DSA if (pkey->type == EVP_PKEY_DSA) @@ -121,8 +117,7 @@ int mode; return(0); } -int EVP_PKEY_copy_parameters(to,from) -EVP_PKEY *to,*from; +int EVP_PKEY_copy_parameters(EVP_PKEY *to, EVP_PKEY *from) { if (to->type != from->type) { @@ -158,8 +153,7 @@ err: return(0); } -int EVP_PKEY_missing_parameters(pkey) -EVP_PKEY *pkey; +int EVP_PKEY_missing_parameters(EVP_PKEY *pkey) { #ifndef NO_DSA if (pkey->type == EVP_PKEY_DSA) @@ -174,8 +168,7 @@ EVP_PKEY *pkey; return(0); } -int EVP_PKEY_cmp_parameters(a,b) -EVP_PKEY *a,*b; +int EVP_PKEY_cmp_parameters(EVP_PKEY *a, EVP_PKEY *b) { #ifndef NO_DSA if ((a->type == EVP_PKEY_DSA) && (b->type == EVP_PKEY_DSA)) @@ -191,7 +184,7 @@ EVP_PKEY *a,*b; return(-1); } -EVP_PKEY *EVP_PKEY_new() +EVP_PKEY *EVP_PKEY_new(void) { EVP_PKEY *ret; @@ -209,10 +202,7 @@ EVP_PKEY *EVP_PKEY_new() return(ret); } -int EVP_PKEY_assign(pkey,type,key) -EVP_PKEY *pkey; -int type; -char *key; +int EVP_PKEY_assign(EVP_PKEY *pkey, int type, char *key) { if (pkey == NULL) return(0); if (pkey->pkey.ptr != NULL) @@ -223,8 +213,7 @@ char *key; return(1); } -int EVP_PKEY_type(type) -int type; +int EVP_PKEY_type(int type) { switch (type) { @@ -244,8 +233,7 @@ int type; } } -void EVP_PKEY_free(x) -EVP_PKEY *x; +void EVP_PKEY_free(EVP_PKEY *x) { int i; @@ -267,8 +255,7 @@ EVP_PKEY *x; Free((char *)x); } -static void EVP_PKEY_free_it(x) -EVP_PKEY *x; +static void EVP_PKEY_free_it(EVP_PKEY *x) { switch (x->type) { diff --git a/crypto/evp/p_open.c b/crypto/evp/p_open.c index 28a8e02252..e6af915c01 100644 --- a/crypto/evp/p_open.c +++ b/crypto/evp/p_open.c @@ -62,13 +62,8 @@ #include "objects.h" #include "x509.h" -int EVP_OpenInit(ctx,type,ek,ekl,iv,priv) -EVP_CIPHER_CTX *ctx; -EVP_CIPHER *type; -unsigned char *ek; -int ekl; -unsigned char *iv; -EVP_PKEY *priv; +int EVP_OpenInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char *ek, + int ekl, unsigned char *iv, EVP_PKEY *priv) { unsigned char *key=NULL; int i,size=0,ret=0; @@ -106,10 +101,7 @@ err: return(ret); } -int EVP_OpenFinal(ctx,out,outl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -int *outl; +int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { int i; diff --git a/crypto/evp/p_seal.c b/crypto/evp/p_seal.c index 09a408de35..618bdc10b6 100644 --- a/crypto/evp/p_seal.c +++ b/crypto/evp/p_seal.c @@ -64,14 +64,8 @@ #include "objects.h" #include "x509.h" -int EVP_SealInit(ctx,type,ek,ekl,iv,pubk,npubk) -EVP_CIPHER_CTX *ctx; -EVP_CIPHER *type; -unsigned char **ek; -int *ekl; -unsigned char *iv; -EVP_PKEY **pubk; -int npubk; +int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, + int *ekl, unsigned char *iv, EVP_PKEY **pubk, int npubk) { unsigned char key[EVP_MAX_KEY_LENGTH]; int i; @@ -105,10 +99,7 @@ int inl; } */ -void EVP_SealFinal(ctx,out,outl) -EVP_CIPHER_CTX *ctx; -unsigned char *out; -int *outl; +void EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { EVP_EncryptFinal(ctx,out,outl); EVP_EncryptInit(ctx,NULL,NULL,NULL); diff --git a/crypto/evp/p_sign.c b/crypto/evp/p_sign.c index 4b34206083..2eeb4107d6 100644 --- a/crypto/evp/p_sign.c +++ b/crypto/evp/p_sign.c @@ -63,27 +63,20 @@ #include "x509.h" #ifdef undef -void EVP_SignInit(ctx,type) -EVP_MD_CTX *ctx; -EVP_MD *type; +void EVP_SignInit(EVP_MD_CTX *ctx, EVP_MD *type) { EVP_DigestInit(ctx,type); } -void EVP_SignUpdate(ctx,data,count) -EVP_MD_CTX *ctx; -unsigned char *data; -unsigned int count; +void EVP_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data, + unsigned int count) { EVP_DigestUpdate(ctx,data,count); } #endif -int EVP_SignFinal(ctx,sigret,siglen,pkey) -EVP_MD_CTX *ctx; -unsigned char *sigret; -unsigned int *siglen; -EVP_PKEY *pkey; +int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, + EVP_PKEY *pkey) { unsigned char m[EVP_MAX_MD_SIZE]; unsigned int m_len; diff --git a/crypto/evp/p_verify.c b/crypto/evp/p_verify.c index 0a9bb05a74..0142ecbf0c 100644 --- a/crypto/evp/p_verify.c +++ b/crypto/evp/p_verify.c @@ -62,11 +62,8 @@ #include "objects.h" #include "x509.h" -int EVP_VerifyFinal(ctx,sigbuf,siglen,pkey) -EVP_MD_CTX *ctx; -unsigned char *sigbuf; -unsigned int siglen; -EVP_PKEY *pkey; +int EVP_VerifyFinal(EVP_MD_CTX *ctx, unsigned char *sigbuf, + unsigned int siglen, EVP_PKEY *pkey) { unsigned char m[EVP_MAX_MD_SIZE]; unsigned int m_len; |