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/x509v3 | |
parent | 3edd7ed15de229230f74c79c3d71e7c9c674cf4f (diff) |
Change functions to ANSI C.
Diffstat (limited to 'crypto/x509v3')
-rw-r--r-- | crypto/x509v3/v3_akey.c | 27 | ||||
-rw-r--r-- | crypto/x509v3/v3_alt.c | 43 | ||||
-rw-r--r-- | crypto/x509v3/v3_bcons.c | 27 | ||||
-rw-r--r-- | crypto/x509v3/v3_bitst.c | 14 | ||||
-rw-r--r-- | crypto/x509v3/v3_conf.c | 95 | ||||
-rw-r--r-- | crypto/x509v3/v3_cpols.c | 107 | ||||
-rw-r--r-- | crypto/x509v3/v3_enum.c | 7 | ||||
-rw-r--r-- | crypto/x509v3/v3_extku.c | 26 | ||||
-rw-r--r-- | crypto/x509v3/v3_genn.c | 29 | ||||
-rw-r--r-- | crypto/x509v3/v3_ia5.c | 11 | ||||
-rw-r--r-- | crypto/x509v3/v3_int.c | 2 | ||||
-rw-r--r-- | crypto/x509v3/v3_lib.c | 28 | ||||
-rw-r--r-- | crypto/x509v3/v3_pku.c | 22 | ||||
-rw-r--r-- | crypto/x509v3/v3_prn.c | 18 | ||||
-rw-r--r-- | crypto/x509v3/v3_skey.c | 17 | ||||
-rw-r--r-- | crypto/x509v3/v3_sxnet.c | 74 | ||||
-rw-r--r-- | crypto/x509v3/v3_utl.c | 62 | ||||
-rw-r--r-- | crypto/x509v3/v3conf.c | 4 | ||||
-rw-r--r-- | crypto/x509v3/v3err.c | 2 | ||||
-rw-r--r-- | crypto/x509v3/v3prin.c | 4 |
20 files changed, 189 insertions, 430 deletions
diff --git a/crypto/x509v3/v3_akey.c b/crypto/x509v3/v3_akey.c index 016a6a806c..7d54d0c235 100644 --- a/crypto/x509v3/v3_akey.c +++ b/crypto/x509v3/v3_akey.c @@ -93,9 +93,7 @@ NULL * ASN1err(ASN1_F_D2I_AUTHORITY_KEYID,ERR_R_MALLOC_FAILURE); */ -int i2d_AUTHORITY_KEYID(a,pp) -AUTHORITY_KEYID *a; -unsigned char **pp; +int i2d_AUTHORITY_KEYID(AUTHORITY_KEYID *a, unsigned char **pp) { M_ASN1_I2D_vars(a); @@ -112,7 +110,7 @@ unsigned char **pp; M_ASN1_I2D_finish(); } -AUTHORITY_KEYID *AUTHORITY_KEYID_new() +AUTHORITY_KEYID *AUTHORITY_KEYID_new(void) { AUTHORITY_KEYID *ret=NULL; ASN1_CTX c; @@ -124,10 +122,8 @@ AUTHORITY_KEYID *AUTHORITY_KEYID_new() M_ASN1_New_Error(ASN1_F_AUTHORITY_KEYID_NEW); } -AUTHORITY_KEYID *d2i_AUTHORITY_KEYID(a,pp,length) -AUTHORITY_KEYID **a; -unsigned char **pp; -long length; +AUTHORITY_KEYID *d2i_AUTHORITY_KEYID(AUTHORITY_KEYID **a, unsigned char **pp, + long length) { M_ASN1_D2I_vars(a,AUTHORITY_KEYID *,AUTHORITY_KEYID_new); M_ASN1_D2I_Init(); @@ -141,8 +137,7 @@ long length; M_ASN1_D2I_Finish(a, AUTHORITY_KEYID_free, ASN1_F_D2I_AUTHORITY_KEYID); } -void AUTHORITY_KEYID_free(a) -AUTHORITY_KEYID *a; +void AUTHORITY_KEYID_free(AUTHORITY_KEYID *a) { if (a == NULL) return; ASN1_OCTET_STRING_free(a->keyid); @@ -151,10 +146,8 @@ AUTHORITY_KEYID *a; Free ((char *)a); } -static STACK *i2v_AUTHORITY_KEYID(method, akeyid, extlist) -X509V3_EXT_METHOD *method; -AUTHORITY_KEYID *akeyid; -STACK *extlist; +static STACK *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, + AUTHORITY_KEYID *akeyid, STACK *extlist) { char *tmp; if(akeyid->keyid) { @@ -181,10 +174,8 @@ STACK *extlist; * this is always included. */ -static AUTHORITY_KEYID *v2i_AUTHORITY_KEYID(method, ctx, values) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -STACK *values; +static AUTHORITY_KEYID *v2i_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, STACK *values) { char keyid=0, issuer=0; int i; diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c index 3adf509668..b8054eb636 100644 --- a/crypto/x509v3/v3_alt.c +++ b/crypto/x509v3/v3_alt.c @@ -95,10 +95,7 @@ NULL, NULL, NULL}, EXT_END }; -STACK *i2v_GENERAL_NAMES(method, gens, ret) -X509V3_EXT_METHOD *method; -STACK *gens; -STACK *ret; +STACK *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, STACK *gens, STACK *ret) { int i; GENERAL_NAME *gen; @@ -109,10 +106,8 @@ STACK *ret; return ret; } -STACK *i2v_GENERAL_NAME(method, gen, ret) -X509V3_EXT_METHOD *method; -GENERAL_NAME *gen; -STACK *ret; +STACK *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, GENERAL_NAME *gen, + STACK *ret) { char oline[256]; unsigned char *p; @@ -166,10 +161,8 @@ STACK *ret; return ret; } -static STACK *v2i_issuer_alt(method, ctx, nval) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -STACK *nval; +static STACK *v2i_issuer_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, + STACK *nval) { STACK *gens = NULL; CONF_VALUE *cnf; @@ -198,9 +191,7 @@ STACK *nval; /* Append subject altname of issuer to issuer alt name of subject */ -static int copy_issuer(ctx, gens) -X509V3_CTX *ctx; -STACK *gens; +static int copy_issuer(X509V3_CTX *ctx, STACK *gens) { STACK *ialt; char *gen; @@ -235,10 +226,8 @@ STACK *gens; } -static STACK *v2i_subject_alt(method, ctx, nval) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -STACK *nval; +static STACK *v2i_subject_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, + STACK *nval) { STACK *gens = NULL; CONF_VALUE *cnf; @@ -269,9 +258,7 @@ STACK *nval; * GENERAL_NAMES */ -static int copy_email(ctx, gens) -X509V3_CTX *ctx; -STACK *gens; +static int copy_email(X509V3_CTX *ctx, STACK *gens) { X509_NAME *nm; ASN1_IA5STRING *email = NULL; @@ -317,10 +304,8 @@ STACK *gens; } -STACK *v2i_GENERAL_NAMES(method, ctx, nval) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -STACK *nval; +STACK *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, + STACK *nval) { GENERAL_NAME *gen; STACK *gens = NULL; @@ -341,10 +326,8 @@ STACK *nval; return NULL; } -GENERAL_NAME *v2i_GENERAL_NAME(method, ctx, cnf) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -CONF_VALUE *cnf; +GENERAL_NAME *v2i_GENERAL_NAME(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, + CONF_VALUE *cnf) { char is_string = 0; int type; diff --git a/crypto/x509v3/v3_bcons.c b/crypto/x509v3/v3_bcons.c index ddd5a66a20..6e2231f15c 100644 --- a/crypto/x509v3/v3_bcons.c +++ b/crypto/x509v3/v3_bcons.c @@ -94,9 +94,7 @@ NULL * ASN1err(ASN1_F_D2I_BASIC_CONSTRAINTS,ERR_R_MALLOC_FAILURE); */ -int i2d_BASIC_CONSTRAINTS(a,pp) -BASIC_CONSTRAINTS *a; -unsigned char **pp; +int i2d_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS *a, unsigned char **pp) { M_ASN1_I2D_vars(a); if(a->ca) M_ASN1_I2D_len (a->ca, i2d_ASN1_BOOLEAN); @@ -109,7 +107,7 @@ unsigned char **pp; M_ASN1_I2D_finish(); } -BASIC_CONSTRAINTS *BASIC_CONSTRAINTS_new() +BASIC_CONSTRAINTS *BASIC_CONSTRAINTS_new(void) { BASIC_CONSTRAINTS *ret=NULL; ASN1_CTX c; @@ -120,10 +118,8 @@ BASIC_CONSTRAINTS *BASIC_CONSTRAINTS_new() M_ASN1_New_Error(ASN1_F_BASIC_CONSTRAINTS_NEW); } -BASIC_CONSTRAINTS *d2i_BASIC_CONSTRAINTS(a,pp,length) -BASIC_CONSTRAINTS **a; -unsigned char **pp; -long length; +BASIC_CONSTRAINTS *d2i_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS **a, + unsigned char **pp, long length) { M_ASN1_D2I_vars(a,BASIC_CONSTRAINTS *,BASIC_CONSTRAINTS_new); M_ASN1_D2I_Init(); @@ -136,28 +132,23 @@ long length; M_ASN1_D2I_Finish(a, BASIC_CONSTRAINTS_free, ASN1_F_D2I_BASIC_CONSTRAINTS); } -void BASIC_CONSTRAINTS_free(a) -BASIC_CONSTRAINTS *a; +void BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a) { if (a == NULL) return; ASN1_INTEGER_free (a->pathlen); Free ((char *)a); } -static STACK *i2v_BASIC_CONSTRAINTS(method, bcons, extlist) -X509V3_EXT_METHOD *method; -BASIC_CONSTRAINTS *bcons; -STACK *extlist; +static STACK *i2v_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, + BASIC_CONSTRAINTS *bcons, STACK *extlist) { X509V3_add_value_bool("CA", bcons->ca, &extlist); X509V3_add_value_int("pathlen", bcons->pathlen, &extlist); return extlist; } -static BASIC_CONSTRAINTS *v2i_BASIC_CONSTRAINTS(method, ctx, values) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -STACK *values; +static BASIC_CONSTRAINTS *v2i_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, STACK *values) { BASIC_CONSTRAINTS *bcons=NULL; CONF_VALUE *val; diff --git a/crypto/x509v3/v3_bitst.c b/crypto/x509v3/v3_bitst.c index 67d865f180..b3b6c49af9 100644 --- a/crypto/x509v3/v3_bitst.c +++ b/crypto/x509v3/v3_bitst.c @@ -101,15 +101,13 @@ static BIT_STRING_BITNAME key_usage_type_table[] = { X509V3_EXT_METHOD v3_nscert = EXT_BITSTRING(NID_netscape_cert_type, ns_cert_type_table); X509V3_EXT_METHOD v3_key_usage = EXT_BITSTRING(NID_key_usage, key_usage_type_table); -static ASN1_BIT_STRING *asn1_bit_string_new() +static ASN1_BIT_STRING *asn1_bit_string_new(void) { return ASN1_BIT_STRING_new(); } -static STACK *i2v_ASN1_BIT_STRING(method, bits, ret) -X509V3_EXT_METHOD *method; -ASN1_BIT_STRING *bits; -STACK *ret; +static STACK *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, + ASN1_BIT_STRING *bits, STACK *ret) { BIT_STRING_BITNAME *bnam; for(bnam =(BIT_STRING_BITNAME *)method->usr_data; bnam->lname; bnam++) { @@ -119,10 +117,8 @@ STACK *ret; return ret; } -static ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(method, ctx, nval) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -STACK *nval; +static ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, STACK *nval) { CONF_VALUE *val; ASN1_BIT_STRING *bs; diff --git a/crypto/x509v3/v3_conf.c b/crypto/x509v3/v3_conf.c index 54ee2a53ca..59a24ef871 100644 --- a/crypto/x509v3/v3_conf.c +++ b/crypto/x509v3/v3_conf.c @@ -78,11 +78,11 @@ static X509_EXTENSION *do_ext_conf(); static X509V3_EXTENSION *v3_generic_extension(); #endif -X509_EXTENSION *X509V3_EXT_conf(conf, ctx, name, value) -LHASH *conf; /* Config file */ -X509V3_CTX *ctx; -char *name; /* Name */ -char *value; /* Value */ +/* LHASH *conf: Config file */ +/* char *name: Name */ +/* char *value: Value */ +X509_EXTENSION *X509V3_EXT_conf(LHASH *conf, X509V3_CTX *ctx, char *name, + char *value) { int crit; int ext_type; @@ -98,11 +98,10 @@ char *value; /* Value */ return ret; } -X509_EXTENSION *X509V3_EXT_conf_nid(conf, ctx, ext_nid, value) -LHASH *conf; /* Config file */ -X509V3_CTX *ctx; -int ext_nid; -char *value; /* Value */ +/* LHASH *conf: Config file */ +/* char *value: Value */ +X509_EXTENSION *X509V3_EXT_conf_nid(LHASH *conf, X509V3_CTX *ctx, int ext_nid, + char *value) { int crit; int ext_type; @@ -113,12 +112,10 @@ char *value; /* Value */ return do_ext_conf(conf, ctx, ext_nid, crit, value); } -static X509_EXTENSION *do_ext_conf(conf, ctx, ext_nid, crit, value) -LHASH *conf; /* Config file */ -X509V3_CTX *ctx; -int ext_nid; -int crit; -char *value; /* Value */ +/* LHASH *conf: Config file */ +/* char *value: Value */ +static X509_EXTENSION *do_ext_conf(LHASH *conf, X509V3_CTX *ctx, int ext_nid, + int crit, char *value) { X509_EXTENSION *ext = NULL; X509V3_EXT_METHOD *method; @@ -179,8 +176,7 @@ char *value; /* Value */ } /* Check the extension string for critical flag */ -static int v3_check_critical(value) -char **value; +static int v3_check_critical(char **value) { char *p = *value; if((strlen(p) < 9) || strncmp(p, "critical,", 9)) return 0; @@ -191,8 +187,7 @@ char **value; } /* Check extension string for generic extension and return the type */ -static int v3_check_generic(value) -char **value; +static int v3_check_generic(char **value) { char *p = *value; if((strlen(p) < 4) || strncmp(p, "RAW:,", 4)) return 0; @@ -203,11 +198,8 @@ char **value; } /* Create a generic extension: for now just handle RAW type */ -static X509_EXTENSION *v3_generic_extension(ext, value, crit, type) -const char *ext; -char *value; -int crit; -int type; +static X509_EXTENSION *v3_generic_extension(const char *ext, char *value, + int crit, int type) { unsigned char *ext_der=NULL; long ext_len; @@ -249,11 +241,8 @@ return extension; * section */ -int X509V3_EXT_add_conf(conf, ctx, section, cert) -LHASH *conf; -X509V3_CTX *ctx; -char *section; -X509 *cert; +int X509V3_EXT_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, + X509 *cert) { X509_EXTENSION *ext; STACK *nval; @@ -272,11 +261,8 @@ X509 *cert; /* Same as above but for a CRL */ -int X509V3_EXT_CRL_add_conf(conf, ctx, section, crl) -LHASH *conf; -X509V3_CTX *ctx; -char *section; -X509_CRL *crl; +int X509V3_EXT_CRL_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, + X509_CRL *crl) { X509_EXTENSION *ext; STACK *nval; @@ -295,54 +281,40 @@ X509_CRL *crl; /* Config database functions */ -char * X509V3_get_string(ctx, name, section) -X509V3_CTX *ctx; -char *name; -char *section; +char * X509V3_get_string(X509V3_CTX *ctx, char *name, char *section) { if(ctx->db_meth->get_string) return ctx->db_meth->get_string(ctx->db, name, section); return NULL; } -STACK * X509V3_get_section(ctx, section) -X509V3_CTX *ctx; -char *section; +STACK * X509V3_get_section(X509V3_CTX *ctx, char *section) { if(ctx->db_meth->get_section) return ctx->db_meth->get_section(ctx->db, section); return NULL; } -void X509V3_string_free(ctx, str) -X509V3_CTX *ctx; -char *str; +void X509V3_string_free(X509V3_CTX *ctx, char *str) { if(!str) return; if(ctx->db_meth->free_string) return ctx->db_meth->free_string(ctx->db, str); } -void X509V3_section_free(ctx, section) -X509V3_CTX *ctx; -STACK *section; +void X509V3_section_free(X509V3_CTX *ctx, STACK *section) { if(!section) return; if(ctx->db_meth->free_section) return ctx->db_meth->free_section(ctx->db, section); } -static char *conf_lhash_get_string(db, section, value) -void *db; -char *section; -char *value; +static char *conf_lhash_get_string(void *db, char *section, char *value) { return CONF_get_string(db, section, value); } -static STACK *conf_lhash_get_section(db, section) -void *db; -char *section; +static STACK *conf_lhash_get_section(void *db, char *section) { return CONF_get_section(db, section); } @@ -354,21 +326,14 @@ NULL, NULL }; -void X509V3_set_conf_lhash(ctx, lhash) -X509V3_CTX *ctx; -LHASH *lhash; +void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH *lhash) { ctx->db_meth = &conf_lhash_method; ctx->db = lhash; } -void X509V3_set_ctx(ctx, issuer, subj, req, crl, flags) -X509V3_CTX *ctx; -X509 *issuer; -X509 *subj; -X509_REQ *req; -X509_CRL *crl; -int flags; +void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req, + X509_CRL *crl, int flags) { ctx->issuer_cert = issuer; ctx->subject_cert = subj; diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c index cb6d0b0f9c..7785047025 100644 --- a/crypto/x509v3/v3_cpols.c +++ b/crypto/x509v3/v3_cpols.c @@ -98,10 +98,8 @@ NULL * ASN1err(ASN1_F_D2I_NOTICEREF,ERR_R_MALLOC_FAILURE); */ -static STACK_OF(POLICYINFO) *r2i_certpol(method, ctx, value) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -char *value; +static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, char *value) { STACK_OF(POLICYINFO) *pols = NULL; char *pstr; @@ -150,9 +148,7 @@ char *value; return NULL; } -static POLICYINFO *policy_section(ctx, polstrs) -X509V3_CTX *ctx; -STACK *polstrs; +static POLICYINFO *policy_section(X509V3_CTX *ctx, STACK *polstrs) { int i; CONF_VALUE *cnf; @@ -224,9 +220,7 @@ STACK *polstrs; } -static POLICYQUALINFO *notice_section(ctx, unot) -X509V3_CTX *ctx; -STACK *unot; +static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, STACK *unot) { int i; CONF_VALUE *cnf; @@ -293,8 +287,7 @@ STACK *unot; return NULL; } -static STACK *nref_nos(nos) -STACK *nos; +static STACK *nref_nos(STACK *nos) { STACK *nnums; CONF_VALUE *cnf; @@ -322,11 +315,8 @@ STACK *nos; } -static int i2r_certpol(method, pol, out, indent) -X509V3_EXT_METHOD *method; -STACK_OF(POLICYINFO) *pol; -BIO *out; -int indent; +static int i2r_certpol(X509V3_EXT_METHOD *method, STACK_OF(POLICYINFO) *pol, + BIO *out, int indent) { int i; POLICYINFO *pinfo; @@ -343,29 +333,24 @@ int indent; } -int i2d_CERTIFICATEPOLICIES(a, pp) -STACK_OF(POLICYINFO) *a; -unsigned char **pp; +int i2d_CERTIFICATEPOLICIES(STACK_OF(POLICYINFO) *a, unsigned char **pp) { return i2d_ASN1_SET_OF_POLICYINFO(a, pp, i2d_POLICYINFO, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, IS_SEQUENCE);} -STACK_OF(POLICYINFO) *CERTIFICATEPOLICIES_new() +STACK_OF(POLICYINFO) *CERTIFICATEPOLICIES_new(void) { return sk_POLICYINFO_new_null(); } -void CERTIFICATEPOLICIES_free(a) -STACK_OF(POLICYINFO) *a; +void CERTIFICATEPOLICIES_free(STACK_OF(POLICYINFO) *a) { sk_POLICYINFO_pop_free(a, POLICYINFO_free); } -STACK_OF(POLICYINFO) *d2i_CERTIFICATEPOLICIES(a,pp,length) -STACK_OF(POLICYINFO) **a; -unsigned char **pp; -long length; +STACK_OF(POLICYINFO) *d2i_CERTIFICATEPOLICIES(STACK_OF(POLICYINFO) **a, + unsigned char **pp,long length) { return d2i_ASN1_SET_OF_POLICYINFO(a, pp, length, d2i_POLICYINFO, POLICYINFO_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); @@ -375,9 +360,7 @@ return d2i_ASN1_SET_OF_POLICYINFO(a, pp, length, d2i_POLICYINFO, IMPLEMENT_STACK_OF(POLICYINFO) IMPLEMENT_ASN1_SET_OF(POLICYINFO) -int i2d_POLICYINFO(a,pp) -POLICYINFO *a; -unsigned char **pp; +int i2d_POLICYINFO(POLICYINFO *a, unsigned char **pp) { M_ASN1_I2D_vars(a); @@ -394,7 +377,7 @@ unsigned char **pp; M_ASN1_I2D_finish(); } -POLICYINFO *POLICYINFO_new() +POLICYINFO *POLICYINFO_new(void) { POLICYINFO *ret=NULL; ASN1_CTX c; @@ -405,10 +388,7 @@ POLICYINFO *POLICYINFO_new() M_ASN1_New_Error(ASN1_F_POLICYINFO_NEW); } -POLICYINFO *d2i_POLICYINFO(a,pp,length) -POLICYINFO **a; -unsigned char **pp; -long length; +POLICYINFO *d2i_POLICYINFO(POLICYINFO **a, unsigned char **pp,long length) { M_ASN1_D2I_vars(a,POLICYINFO *,POLICYINFO_new); M_ASN1_D2I_Init(); @@ -421,8 +401,7 @@ long length; M_ASN1_D2I_Finish(a, POLICYINFO_free, ASN1_F_D2I_POLICYINFO); } -void POLICYINFO_free(a) -POLICYINFO *a; +void POLICYINFO_free(POLICYINFO *a) { if (a == NULL) return; ASN1_OBJECT_free(a->policyid); @@ -430,10 +409,8 @@ POLICYINFO *a; Free (a); } -static void print_qualifiers(out, quals, indent) -BIO *out; -STACK_OF(POLICYQUALINFO) *quals; -int indent; +static void print_qualifiers(BIO *out, STACK_OF(POLICYQUALINFO) *quals, + int indent) { POLICYQUALINFO *qualinfo; int i; @@ -462,10 +439,7 @@ int indent; } } -static void print_notice(out, notice, indent) -BIO *out; -USERNOTICE *notice; -int indent; +static void print_notice(BIO *out, USERNOTICE *notice, int indent) { int i; if(notice->noticeref) { @@ -493,9 +467,7 @@ int indent; -int i2d_POLICYQUALINFO(a,pp) -POLICYQUALINFO *a; -unsigned char **pp; +int i2d_POLICYQUALINFO(POLICYQUALINFO *a, unsigned char **pp) { M_ASN1_I2D_vars(a); @@ -534,7 +506,7 @@ unsigned char **pp; M_ASN1_I2D_finish(); } -POLICYQUALINFO *POLICYQUALINFO_new() +POLICYQUALINFO *POLICYQUALINFO_new(void) { POLICYQUALINFO *ret=NULL; ASN1_CTX c; @@ -545,10 +517,8 @@ POLICYQUALINFO *POLICYQUALINFO_new() M_ASN1_New_Error(ASN1_F_POLICYQUALINFO_NEW); } -POLICYQUALINFO *d2i_POLICYQUALINFO(a,pp,length) -POLICYQUALINFO **a; -unsigned char **pp; -long length; +POLICYQUALINFO *d2i_POLICYQUALINFO(POLICYQUALINFO **a, unsigned char **pp, + long length) { M_ASN1_D2I_vars(a,POLICYQUALINFO *,POLICYQUALINFO_new); M_ASN1_D2I_Init(); @@ -570,8 +540,7 @@ long length; M_ASN1_D2I_Finish(a, POLICYQUALINFO_free, ASN1_F_D2I_POLICYQUALINFO); } -void POLICYQUALINFO_free(a) -POLICYQUALINFO *a; +void POLICYQUALINFO_free(POLICYQUALINFO *a) { if (a == NULL) return; switch(OBJ_obj2nid(a->pqualid)) { @@ -592,9 +561,7 @@ POLICYQUALINFO *a; Free (a); } -int i2d_USERNOTICE(a,pp) -USERNOTICE *a; -unsigned char **pp; +int i2d_USERNOTICE(USERNOTICE *a, unsigned char **pp) { M_ASN1_I2D_vars(a); @@ -609,7 +576,7 @@ unsigned char **pp; M_ASN1_I2D_finish(); } -USERNOTICE *USERNOTICE_new() +USERNOTICE *USERNOTICE_new(void) { USERNOTICE *ret=NULL; ASN1_CTX c; @@ -620,10 +587,7 @@ USERNOTICE *USERNOTICE_new() M_ASN1_New_Error(ASN1_F_USERNOTICE_NEW); } -USERNOTICE *d2i_USERNOTICE(a,pp,length) -USERNOTICE **a; -unsigned char **pp; -long length; +USERNOTICE *d2i_USERNOTICE(USERNOTICE **a, unsigned char **pp,long length) { M_ASN1_D2I_vars(a,USERNOTICE *,USERNOTICE_new); M_ASN1_D2I_Init(); @@ -635,8 +599,7 @@ long length; M_ASN1_D2I_Finish(a, USERNOTICE_free, ASN1_F_D2I_USERNOTICE); } -void USERNOTICE_free(a) -USERNOTICE *a; +void USERNOTICE_free(USERNOTICE *a) { if (a == NULL) return; NOTICEREF_free(a->noticeref); @@ -644,9 +607,7 @@ USERNOTICE *a; Free (a); } -int i2d_NOTICEREF(a,pp) -NOTICEREF *a; -unsigned char **pp; +int i2d_NOTICEREF(NOTICEREF *a, unsigned char **pp) { M_ASN1_I2D_vars(a); @@ -661,7 +622,7 @@ unsigned char **pp; M_ASN1_I2D_finish(); } -NOTICEREF *NOTICEREF_new() +NOTICEREF *NOTICEREF_new(void) { NOTICEREF *ret=NULL; ASN1_CTX c; @@ -672,10 +633,7 @@ NOTICEREF *NOTICEREF_new() M_ASN1_New_Error(ASN1_F_NOTICEREF_NEW); } -NOTICEREF *d2i_NOTICEREF(a,pp,length) -NOTICEREF **a; -unsigned char **pp; -long length; +NOTICEREF *d2i_NOTICEREF(NOTICEREF **a, unsigned char **pp,long length) { M_ASN1_D2I_vars(a,NOTICEREF *,NOTICEREF_new); M_ASN1_D2I_Init(); @@ -692,8 +650,7 @@ long length; M_ASN1_D2I_Finish(a, NOTICEREF_free, ASN1_F_D2I_NOTICEREF); } -void NOTICEREF_free(a) -NOTICEREF *a; +void NOTICEREF_free(NOTICEREF *a) { if (a == NULL) return; DISPLAYTEXT_free(a->organization); diff --git a/crypto/x509v3/v3_enum.c b/crypto/x509v3/v3_enum.c index 8c0b37ce86..eb9f7163c9 100644 --- a/crypto/x509v3/v3_enum.c +++ b/crypto/x509v3/v3_enum.c @@ -84,14 +84,13 @@ i2d_ASN1_ENUMERATED, NULL, NULL, NULL, NULL, (char *)crl_reasons}; -static ASN1_ENUMERATED *asn1_enumerated_new() +static ASN1_ENUMERATED *asn1_enumerated_new(void) { return ASN1_ENUMERATED_new(); } -char *i2s_ASN1_ENUMERATED_TABLE(method, e) -X509V3_EXT_METHOD *method; -ASN1_ENUMERATED *e; +char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method, + ASN1_ENUMERATED *e) { ENUMERATED_NAMES *enam; long strval; diff --git a/crypto/x509v3/v3_extku.c b/crypto/x509v3/v3_extku.c index aa8fe1e5a6..b01359d393 100644 --- a/crypto/x509v3/v3_extku.c +++ b/crypto/x509v3/v3_extku.c @@ -84,30 +84,24 @@ NULL,NULL, NULL }; -STACK *ext_ku_new() +STACK *ext_ku_new(void) { return sk_new_null(); } -void ext_ku_free(eku) -STACK *eku; +void ext_ku_free(STACK *eku) { sk_pop_free(eku, ASN1_OBJECT_free); return; } -int i2d_ext_ku(a,pp) -STACK *a; -unsigned char **pp; +int i2d_ext_ku(STACK *a, unsigned char **pp) { return i2d_ASN1_SET(a, pp, i2d_ASN1_OBJECT, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, IS_SEQUENCE); } -STACK *d2i_ext_ku(a,pp,length) -STACK **a; -unsigned char **pp; -long length; +STACK *d2i_ext_ku(STACK **a, unsigned char **pp, long length) { return d2i_ASN1_SET(a, pp, length, (char *(*)())(d2i_ASN1_OBJECT), ASN1_OBJECT_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); @@ -115,10 +109,8 @@ long length; -static STACK *i2v_ext_ku(method, eku, ext_list) -X509V3_EXT_METHOD *method; -STACK *eku; -STACK *ext_list; +static STACK *i2v_ext_ku(X509V3_EXT_METHOD *method, STACK *eku, + STACK *ext_list) { int i; ASN1_OBJECT *obj; @@ -131,10 +123,8 @@ for(i = 0; i < sk_num(eku); i++) { return ext_list; } -static STACK *v2i_ext_ku(method, ctx, nval) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -STACK *nval; +static STACK *v2i_ext_ku(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, + STACK *nval) { STACK *extku; char *extval; diff --git a/crypto/x509v3/v3_genn.c b/crypto/x509v3/v3_genn.c index e7918d6b3c..d2804c3353 100644 --- a/crypto/x509v3/v3_genn.c +++ b/crypto/x509v3/v3_genn.c @@ -69,9 +69,7 @@ * ASN1err(ASN1_F_D2I_GENERAL_NAME,ERR_R_MALLOC_FAILURE); */ -int i2d_GENERAL_NAME(a,pp) -GENERAL_NAME *a; -unsigned char **pp; +int i2d_GENERAL_NAME(GENERAL_NAME *a, unsigned char **pp) { unsigned char *p; int ret; @@ -120,7 +118,7 @@ unsigned char **pp; return ret; } -GENERAL_NAME *GENERAL_NAME_new() +GENERAL_NAME *GENERAL_NAME_new(void) { GENERAL_NAME *ret=NULL; ASN1_CTX c; @@ -131,10 +129,8 @@ GENERAL_NAME *GENERAL_NAME_new() M_ASN1_New_Error(ASN1_F_GENERAL_NAME_NEW); } -GENERAL_NAME *d2i_GENERAL_NAME(a,pp,length) -GENERAL_NAME **a; -unsigned char **pp; -long length; +GENERAL_NAME *d2i_GENERAL_NAME(GENERAL_NAME **a, unsigned char **pp, + long length) { unsigned char _tmp; M_ASN1_D2I_vars(a,GENERAL_NAME *,GENERAL_NAME_new); @@ -181,8 +177,7 @@ long length; M_ASN1_D2I_Finish(a, GENERAL_NAME_free, ASN1_F_D2I_GENERAL_NAME); } -void GENERAL_NAME_free(a) -GENERAL_NAME *a; +void GENERAL_NAME_free(GENERAL_NAME *a) { if (a == NULL) return; switch(a->type) { @@ -219,29 +214,23 @@ GENERAL_NAME *a; * an explicit functions. */ -STACK *GENERAL_NAMES_new() +STACK *GENERAL_NAMES_new(void) { return sk_new(NULL); } -void GENERAL_NAMES_free(a) -STACK *a; +void GENERAL_NAMES_free(STACK *a) { sk_pop_free(a, GENERAL_NAME_free); } -STACK *d2i_GENERAL_NAMES(a,pp,length) -STACK **a; -unsigned char **pp; -long length; +STACK *d2i_GENERAL_NAMES(STACK **a, unsigned char **pp, long length) { return d2i_ASN1_SET(a, pp, length, (char *(*)())d2i_GENERAL_NAME, GENERAL_NAME_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); } -int i2d_GENERAL_NAMES(a,pp) -STACK *a; -unsigned char **pp; +int i2d_GENERAL_NAMES(STACK *a, unsigned char **pp) { return i2d_ASN1_SET(a, pp, i2d_GENERAL_NAME, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, IS_SEQUENCE); diff --git a/crypto/x509v3/v3_ia5.c b/crypto/x509v3/v3_ia5.c index 1030d8ea69..f4042915f0 100644 --- a/crypto/x509v3/v3_ia5.c +++ b/crypto/x509v3/v3_ia5.c @@ -90,9 +90,8 @@ static ASN1_IA5STRING *ia5string_new(void) return ASN1_IA5STRING_new(); } -static char *i2s_ASN1_IA5STRING(method, ia5) -X509V3_EXT_METHOD *method; -ASN1_IA5STRING *ia5; +static char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, + ASN1_IA5STRING *ia5) { char *tmp; if(!ia5 || !ia5->length) return NULL; @@ -102,10 +101,8 @@ ASN1_IA5STRING *ia5; return tmp; } -static ASN1_IA5STRING *s2i_ASN1_IA5STRING(method, ctx, str) -X509V3_EXT_METHOD *method; -X509V3_CTX *ctx; -char *str; +static ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method, + X509V3_CTX *ctx, char *str) { ASN1_IA5STRING *ia5; if(!str) { diff --git a/crypto/x509v3/v3_int.c b/crypto/x509v3/v3_int.c index 03b1c2539a..7c69dd0740 100644 --- a/crypto/x509v3/v3_int.c +++ b/crypto/x509v3/v3_int.c @@ -72,7 +72,7 @@ i2d_ASN1_INTEGER, NULL, NULL, NULL, NULL, NULL}; -static ASN1_INTEGER *asn1_integer_new() +static ASN1_INTEGER *asn1_integer_new |