Change functions to ANSI C.
authorUlf Möller <ulf@openssl.org>
Mon, 19 Apr 1999 21:31:43 +0000 (21:31 +0000)
committerUlf Möller <ulf@openssl.org>
Mon, 19 Apr 1999 21:31:43 +0000 (21:31 +0000)
491 files changed:
CHANGES
apps/apps.c
apps/asn1pars.c
apps/ca.c
apps/ciphers.c
apps/crl.c
apps/crl2p7.c
apps/dgst.c
apps/dh.c
apps/dsa.c
apps/dsaparam.c
apps/enc.c
apps/errstr.c
apps/gendh.c
apps/gendsa.c
apps/genrsa.c
apps/nseq.c
apps/openssl.c
apps/pem_mail.c
apps/pkcs12.c
apps/pkcs7.c
apps/req.c
apps/rsa.c
apps/s_cb.c
apps/s_client.c
apps/s_server.c
apps/s_socket.c
apps/s_time.c
apps/sc.c
apps/sess_id.c
apps/speed.c
apps/verify.c
apps/version.c
apps/x509.c
crypto/asn1/a_bitstr.c
crypto/asn1/a_bmp.c
crypto/asn1/a_bool.c
crypto/asn1/a_bytes.c
crypto/asn1/a_d2i_fp.c
crypto/asn1/a_digest.c
crypto/asn1/a_dup.c
crypto/asn1/a_enum.c
crypto/asn1/a_gentm.c
crypto/asn1/a_hdr.c
crypto/asn1/a_i2d_fp.c
crypto/asn1/a_int.c
crypto/asn1/a_meth.c
crypto/asn1/a_object.c
crypto/asn1/a_octet.c
crypto/asn1/a_print.c
crypto/asn1/a_set.c
crypto/asn1/a_sign.c
crypto/asn1/a_time.c
crypto/asn1/a_type.c
crypto/asn1/a_utctm.c
crypto/asn1/a_utf8.c
crypto/asn1/a_verify.c
crypto/asn1/a_vis.c
crypto/asn1/asn1_err.c
crypto/asn1/asn1_lib.c
crypto/asn1/asn1_par.c
crypto/asn1/asn_pack.c
crypto/asn1/d2i_dhp.c
crypto/asn1/d2i_dsap.c
crypto/asn1/d2i_pr.c
crypto/asn1/d2i_pu.c
crypto/asn1/d2i_r_pr.c
crypto/asn1/d2i_r_pu.c
crypto/asn1/d2i_s_pr.c
crypto/asn1/d2i_s_pu.c
crypto/asn1/evp_asn1.c
crypto/asn1/f_enum.c
crypto/asn1/f_int.c
crypto/asn1/f_string.c
crypto/asn1/i2d_dhp.c
crypto/asn1/i2d_dsap.c
crypto/asn1/i2d_pr.c
crypto/asn1/i2d_pu.c
crypto/asn1/i2d_r_pr.c
crypto/asn1/i2d_r_pu.c
crypto/asn1/i2d_s_pr.c
crypto/asn1/i2d_s_pu.c
crypto/asn1/n_pkey.c
crypto/asn1/nsseq.c
crypto/asn1/p5_pbe.c
crypto/asn1/p5_pbev2.c
crypto/asn1/p7_dgst.c
crypto/asn1/p7_enc.c
crypto/asn1/p7_enc_c.c
crypto/asn1/p7_evp.c
crypto/asn1/p7_i_s.c
crypto/asn1/p7_lib.c
crypto/asn1/p7_recip.c
crypto/asn1/p7_s_e.c
crypto/asn1/p7_signd.c
crypto/asn1/p7_signi.c
crypto/asn1/p8_pkey.c
crypto/asn1/pkcs8.c
crypto/asn1/t_crl.c
crypto/asn1/t_pkey.c
crypto/asn1/t_req.c
crypto/asn1/t_x509.c
crypto/asn1/x_algor.c
crypto/asn1/x_attrib.c
crypto/asn1/x_cinf.c
crypto/asn1/x_crl.c
crypto/asn1/x_exten.c
crypto/asn1/x_info.c
crypto/asn1/x_name.c
crypto/asn1/x_pkey.c
crypto/asn1/x_pubkey.c
crypto/asn1/x_req.c
crypto/asn1/x_sig.c
crypto/asn1/x_spki.c
crypto/asn1/x_val.c
crypto/asn1/x_x509.c
crypto/bf/bf_cbc.c
crypto/bf/bf_cfb64.c
crypto/bf/bf_ecb.c
crypto/bf/bf_enc.c
crypto/bf/bf_ofb64.c
crypto/bf/bf_opts.c
crypto/bf/bf_skey.c
crypto/bf/bfspeed.c
crypto/bf/bftest.c
crypto/bio/b_dump.c
crypto/bio/b_sock.c
crypto/bio/bf_buff.c
crypto/bio/bf_nbio.c
crypto/bio/bf_null.c
crypto/bio/bio_cb.c
crypto/bio/bio_err.c
crypto/bio/bio_lib.c
crypto/bio/bss_acpt.c
crypto/bio/bss_conn.c
crypto/bio/bss_file.c
crypto/bio/bss_log.c
crypto/bio/bss_mem.c
crypto/bio/bss_null.c
crypto/bio/bss_rtcp.c
crypto/bio/bss_sock.c
crypto/bn/bn_add.c
crypto/bn/bn_asm.c
crypto/bn/bn_blind.c
crypto/bn/bn_comba.c
crypto/bn/bn_div.c
crypto/bn/bn_err.c
crypto/bn/bn_exp.c
crypto/bn/bn_exp2.c
crypto/bn/bn_gcd.c
crypto/bn/bn_lib.c
crypto/bn/bn_m.c
crypto/bn/bn_mont.c
crypto/bn/bn_mpi.c
crypto/bn/bn_mul.c
crypto/bn/bn_opts.c
crypto/bn/bn_prime.c
crypto/bn/bn_print.c
crypto/bn/bn_rand.c
crypto/bn/bn_recp.c
crypto/bn/bn_shift.c
crypto/bn/bn_sqr.c
crypto/bn/bn_word.c
crypto/bn/bnspeed.c
crypto/bn/bntest.c
crypto/bn/expspeed.c
crypto/bn/exptest.c
crypto/bn/old/b_sqr.c
crypto/bn/old/bn_high.c
crypto/bn/old/bn_ka.c
crypto/bn/old/bn_low.c
crypto/bn/old/bn_m.c
crypto/bn/old/bn_wmul.c
crypto/bn/test.c
crypto/buffer/buf_err.c
crypto/buffer/buffer.c
crypto/cast/c_cfb64.c
crypto/cast/c_ecb.c
crypto/cast/c_enc.c
crypto/cast/c_ofb64.c
crypto/cast/c_skey.c
crypto/cast/cast_spd.c
crypto/cast/castopts.c
crypto/cast/casttest.c
crypto/comp/c_rle.c
crypto/comp/c_zlib.c
crypto/comp/comp_err.c
crypto/comp/comp_lib.c
crypto/conf/cnf_save.c
crypto/conf/conf.c
crypto/conf/conf_err.c
crypto/cpt_err.c
crypto/cryptlib.c
crypto/cversion.c
crypto/des/cbc3_enc.c
crypto/des/cbc_cksm.c
crypto/des/cbc_enc.c
crypto/des/cfb64ede.c
crypto/des/cfb64enc.c
crypto/des/cfb_enc.c
crypto/des/des.c
crypto/des/des_enc.c
crypto/des/des_opts.c
crypto/des/destest.c
crypto/des/ecb3_enc.c
crypto/des/ecb_enc.c
crypto/des/ede_cbcm_enc.c
crypto/des/ede_enc.c
crypto/des/enc_read.c
crypto/des/enc_writ.c
crypto/des/fcrypt.c
crypto/des/fcrypt_b.c
crypto/des/ncbc_enc.c
crypto/des/ofb64ede.c
crypto/des/ofb64enc.c
crypto/des/ofb_enc.c
crypto/des/pcbc_enc.c
crypto/des/qud_cksm.c
crypto/des/rand_key.c
crypto/des/read2pwd.c
crypto/des/read_pwd.c
crypto/des/rpc_enc.c
crypto/des/rpw.c
crypto/des/set_key.c
crypto/des/speed.c
crypto/des/str2key.c
crypto/des/supp.c
crypto/des/xcbc_enc.c
crypto/dh/dh_check.c
crypto/dh/dh_err.c
crypto/dh/dh_gen.c
crypto/dh/dh_key.c
crypto/dh/dh_lib.c
crypto/dh/dhtest.c
crypto/dsa/dsa_asn1.c
crypto/dsa/dsa_err.c
crypto/dsa/dsa_gen.c
crypto/dsa/dsa_key.c
crypto/dsa/dsa_lib.c
crypto/dsa/dsa_sign.c
crypto/dsa/dsa_vrf.c
crypto/dsa/dsagen.c
crypto/dsa/dsatest.c
crypto/err/err.c
crypto/err/err_all.c
crypto/err/err_prn.c
crypto/evp/bio_b64.c
crypto/evp/bio_enc.c
crypto/evp/bio_md.c
crypto/evp/bio_ok.c
crypto/evp/c_all.c
crypto/evp/digest.c
crypto/evp/e_cbc_3d.c
crypto/evp/e_cbc_bf.c
crypto/evp/e_cbc_c.c
crypto/evp/e_cbc_d.c
crypto/evp/e_cbc_i.c
crypto/evp/e_cbc_r2.c
crypto/evp/e_cbc_r5.c
crypto/evp/e_cfb_3d.c
crypto/evp/e_cfb_bf.c
crypto/evp/e_cfb_c.c
crypto/evp/e_cfb_d.c
crypto/evp/e_cfb_i.c
crypto/evp/e_cfb_r2.c
crypto/evp/e_cfb_r5.c
crypto/evp/e_ecb_3d.c
crypto/evp/e_ecb_bf.c
crypto/evp/e_ecb_c.c
crypto/evp/e_ecb_d.c
crypto/evp/e_ecb_i.c
crypto/evp/e_ecb_r2.c
crypto/evp/e_ecb_r5.c
crypto/evp/e_null.c
crypto/evp/e_ofb_3d.c
crypto/evp/e_ofb_bf.c
crypto/evp/e_ofb_c.c
crypto/evp/e_ofb_d.c
crypto/evp/e_ofb_i.c
crypto/evp/e_ofb_r2.c
crypto/evp/e_ofb_r5.c
crypto/evp/e_rc4.c
crypto/evp/e_xcbc_d.c
crypto/evp/encode.c
crypto/evp/evp_enc.c
crypto/evp/evp_err.c
crypto/evp/evp_key.c
crypto/evp/evp_lib.c
crypto/evp/evp_pbe.c
crypto/evp/evp_pkey.c
crypto/evp/m_dss.c
crypto/evp/m_dss1.c
crypto/evp/m_md2.c
crypto/evp/m_md5.c
crypto/evp/m_mdc2.c
crypto/evp/m_null.c
crypto/evp/m_ripemd.c
crypto/evp/m_sha.c
crypto/evp/m_sha1.c
crypto/evp/names.c
crypto/evp/p_dec.c
crypto/evp/p_enc.c
crypto/evp/p_lib.c
crypto/evp/p_open.c
crypto/evp/p_seal.c
crypto/evp/p_sign.c
crypto/evp/p_verify.c
crypto/ex_data.c
crypto/hmac/hmac.c
crypto/hmac/hmactest.c
crypto/idea/i_cbc.c
crypto/idea/i_cfb64.c
crypto/idea/i_ecb.c
crypto/idea/i_ofb64.c
crypto/idea/i_skey.c
crypto/idea/idea_spd.c
crypto/idea/ideatest.c
crypto/lhash/lh_stats.c
crypto/lhash/lhash.c
crypto/md2/md2.c
crypto/md2/md2_dgst.c
crypto/md2/md2_one.c
crypto/md2/md2test.c
crypto/md5/md5.c
crypto/md5/md5_dgst.c
crypto/md5/md5_one.c
crypto/md5/md5test.c
crypto/mdc2/mdc2_one.c
crypto/mdc2/mdc2dgst.c
crypto/mdc2/mdc2test.c
crypto/mem.c
crypto/objects/o_names.c
crypto/objects/obj_dat.c
crypto/objects/obj_err.c
crypto/objects/obj_lib.c
crypto/pem/pem_all.c
crypto/pem/pem_err.c
crypto/pem/pem_info.c
crypto/pem/pem_lib.c
crypto/pem/pem_seal.c
crypto/pem/pem_sign.c
crypto/pkcs12/p12_add.c
crypto/pkcs12/p12_attr.c
crypto/pkcs12/p12_bags.c
crypto/pkcs12/p12_crpt.c
crypto/pkcs12/p12_crt.c
crypto/pkcs12/p12_decr.c
crypto/pkcs12/p12_init.c
crypto/pkcs12/p12_key.c
crypto/pkcs12/p12_kiss.c
crypto/pkcs12/p12_lib.c
crypto/pkcs12/p12_mac.c
crypto/pkcs12/p12_mutl.c
crypto/pkcs12/p12_sbag.c
crypto/pkcs12/p12_utl.c
crypto/pkcs12/pk12err.c
crypto/pkcs7/bio_ber.c
crypto/pkcs7/dec.c
crypto/pkcs7/example.c
crypto/pkcs7/pk7_doit.c
crypto/pkcs7/pk7_lib.c
crypto/pkcs7/pkcs7err.c
crypto/pkcs7/verify.c
crypto/rand/md_rand.c
crypto/rand/rand_lib.c
crypto/rand/randfile.c
crypto/rc2/rc2_cbc.c
crypto/rc2/rc2_ecb.c
crypto/rc2/rc2_skey.c
crypto/rc2/rc2cfb64.c
crypto/rc2/rc2ofb64.c
crypto/rc2/rc2speed.c
crypto/rc2/rc2test.c
crypto/rc4/rc4.c
crypto/rc4/rc4_enc.c
crypto/rc4/rc4_skey.c
crypto/rc4/rc4speed.c
crypto/rc4/rc4test.c
crypto/rc5/rc5_ecb.c
crypto/rc5/rc5_enc.c
crypto/rc5/rc5_skey.c
crypto/rc5/rc5cfb64.c
crypto/rc5/rc5ofb64.c
crypto/rc5/rc5speed.c
crypto/rc5/rc5test.c
crypto/ripemd/rmd160.c
crypto/ripemd/rmd_dgst.c
crypto/ripemd/rmd_one.c
crypto/ripemd/rmdtest.c
crypto/rsa/rsa_eay.c
crypto/rsa/rsa_err.c
crypto/rsa/rsa_gen.c
crypto/rsa/rsa_lib.c
crypto/rsa/rsa_none.c
crypto/rsa/rsa_oaep.c
crypto/rsa/rsa_oaep_test.c
crypto/rsa/rsa_pk1.c
crypto/rsa/rsa_saos.c
crypto/rsa/rsa_sign.c
crypto/rsa/rsa_ssl.c
crypto/sha/sha.c
crypto/sha/sha1.c
crypto/sha/sha1_one.c
crypto/sha/sha1dgst.c
crypto/sha/sha1test.c
crypto/sha/sha_dgst.c
crypto/sha/sha_one.c
crypto/sha/shatest.c
crypto/stack/stack.c
crypto/threads/mttest.c
crypto/threads/th-lock.c
crypto/tmdiff.c
crypto/txt_db/txt_db.c
crypto/x509/by_dir.c
crypto/x509/by_file.c
crypto/x509/x509_cmp.c
crypto/x509/x509_d2.c
crypto/x509/x509_def.c
crypto/x509/x509_err.c
crypto/x509/x509_ext.c
crypto/x509/x509_lu.c
crypto/x509/x509_obj.c
crypto/x509/x509_r2x.c
crypto/x509/x509_req.c
crypto/x509/x509_set.c
crypto/x509/x509_txt.c
crypto/x509/x509_v3.c
crypto/x509/x509_vfy.c
crypto/x509/x509name.c
crypto/x509/x509rset.c
crypto/x509/x509type.c
crypto/x509/x_all.c
crypto/x509v3/v3_akey.c
crypto/x509v3/v3_alt.c
crypto/x509v3/v3_bcons.c
crypto/x509v3/v3_bitst.c
crypto/x509v3/v3_conf.c
crypto/x509v3/v3_cpols.c
crypto/x509v3/v3_enum.c
crypto/x509v3/v3_extku.c
crypto/x509v3/v3_genn.c
crypto/x509v3/v3_ia5.c
crypto/x509v3/v3_int.c
crypto/x509v3/v3_lib.c
crypto/x509v3/v3_pku.c
crypto/x509v3/v3_prn.c
crypto/x509v3/v3_skey.c
crypto/x509v3/v3_sxnet.c
crypto/x509v3/v3_utl.c
crypto/x509v3/v3conf.c
crypto/x509v3/v3err.c
crypto/x509v3/v3prin.c
perl/openssl_cb.c
rsaref/rsar_err.c
rsaref/rsaref.c
ssl/bio_ssl.c
ssl/s23_clnt.c
ssl/s23_lib.c
ssl/s23_meth.c
ssl/s23_pkt.c
ssl/s23_srvr.c
ssl/s2_clnt.c
ssl/s2_enc.c
ssl/s2_lib.c
ssl/s2_meth.c
ssl/s2_pkt.c
ssl/s2_srvr.c
ssl/s3_both.c
ssl/s3_clnt.c
ssl/s3_enc.c
ssl/s3_lib.c
ssl/s3_meth.c
ssl/s3_pkt.c
ssl/s3_srvr.c
ssl/ssl_algs.c
ssl/ssl_asn1.c
ssl/ssl_cert.c
ssl/ssl_ciph.c
ssl/ssl_err.c
ssl/ssl_err2.c
ssl/ssl_lib.c
ssl/ssl_rsa.c
ssl/ssl_sess.c
ssl/ssl_stat.c
ssl/ssl_txt.c
ssl/ssltest.c
ssl/t1_clnt.c
ssl/t1_enc.c
ssl/t1_lib.c
ssl/t1_meth.c
ssl/t1_srvr.c

diff --git a/CHANGES b/CHANGES
index 4e58f2d..beb3e62 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@
 
  Changes between 0.9.2b and 0.9.3
 
+  *) Change functions to ANSI C.
+     [Ulf Möller]
+
   *) Fix typos in error codes.
      [Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>, Ulf Möller]
 
index 5f0c8fa..ba07016 100644 (file)
@@ -76,10 +76,7 @@ int app_init();
 #endif
 
 #ifdef undef /* never finished - probably never will be :-) */
-int args_from_file(file,argc,argv)
-char *file;
-int *argc;
-char **argv[];
+int args_from_file(char *file, int *argc, char **argv[])
        {
        FILE *fp;
        int num,i;
@@ -157,8 +154,7 @@ char **argv[];
        }
 #endif
 
-int str2fmt(s)
-char *s;
+int str2fmt(char *s)
        {
        if      ((*s == 'D') || (*s == 'd'))
                return(FORMAT_ASN1);
@@ -173,10 +169,7 @@ char *s;
        }
 
 #if defined(MSDOS) || defined(WIN32) || defined(WIN16)
-void program_name(in,out,size)
-char *in;
-char *out;
-int size;
+void program_name(char *in, char *out, int size)
        {
        int i,n;
        char *p=NULL;
@@ -213,10 +206,7 @@ int size;
        out[n]='\0';
        }
 #else
-void program_name(in,out,size)
-char *in;
-char *out;
-int size;
+void program_name(char *in, char *out, int size)
        {
        char *p;
 
@@ -231,9 +221,7 @@ int size;
 #endif
 
 #ifdef WIN32
-int WIN32_rename(from,to)
-char *from;
-char *to;
+int WIN32_rename(char *from, char *to)
        {
        int ret;
 
@@ -242,11 +230,7 @@ char *to;
        }
 #endif
 
-int chopup_args(arg,buf,argc,argv)
-ARGS *arg;
-char *buf;
-int *argc;
-char **argv[];
+int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[])
        {
        int num,len,i;
        char *p;
@@ -312,8 +296,7 @@ char **argv[];
        }
 
 #ifndef APP_INIT
-int app_init(mesgwin)
-long mesgwin;
+int app_init(long mesgwin)
        {
        return(1);
        }
index cf9a3bf..39e9788 100644 (file)
@@ -80,9 +80,7 @@
 #undef PROG
 #define PROG   asn1parse_main
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int i,badops=0,offset=0,ret=1,j;
        unsigned int length=0;
index 4671880..7cdf14d 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -215,9 +215,7 @@ static char *section=NULL;
 static int preserve=0;
 static int msie_hack=0;
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int total=0;
        int total_done=0;
@@ -1179,16 +1177,12 @@ err:
        EXIT(ret);
        }
 
-static void lookup_fail(name,tag)
-char *name;
-char *tag;
+static void lookup_fail(char *name, char *tag)
        {
        BIO_printf(bio_err,"variable lookup failed for %s::%s\n",name,tag);
        }
 
-static int MS_CALLBACK key_callback(buf,len,verify)
-char *buf;
-int len,verify;
+static int MS_CALLBACK key_callback(char *buf, int len, int verify)
        {
        int i;
 
@@ -1199,8 +1193,7 @@ int len,verify;
        return(i);
        }
 
-static unsigned long index_serial_hash(a)
-char **a;
+static unsigned long index_serial_hash(char **a)
        {
        char *n;
 
@@ -1209,9 +1202,7 @@ char **a;
        return(lh_strhash(n));
        }
 
-static int index_serial_cmp(a,b)
-char **a;
-char **b;
+static int index_serial_cmp(char **a, char **b)
        {
        char *aa,*bb;
 
@@ -1220,21 +1211,17 @@ char **b;
        return(strcmp(aa,bb));
        }
 
-static unsigned long index_name_hash(a)
-char **a;
+static unsigned long index_name_hash(char **a)
        { return(lh_strhash(a[DB_name])); }
 
-static int index_name_qual(a)
-char **a;
+static int index_name_qual(char **a)
        { return(a[0][0] == 'V'); }
 
-static int index_name_cmp(a,b)
-char **a;
-char **b;
-       { return(strcmp(a[DB_name],b[DB_name])); }
+static int index_name_cmp(char **a, char **b)
+       { return(strcmp(a[DB_name],
+            b[DB_name])); }
 
-static BIGNUM *load_serial(serialfile)
-char *serialfile;
+static BIGNUM *load_serial(char *serialfile)
        {
        BIO *in=NULL;
        BIGNUM *ret=NULL;
@@ -1272,9 +1259,7 @@ err:
        return(ret);
        }
 
-static int save_serial(serialfile,serial)
-char *serialfile;
-BIGNUM *serial;
+static int save_serial(char *serialfile, BIGNUM *serial)
        {
        BIO *out;
        int ret=0;
@@ -1306,22 +1291,10 @@ err:
        return(ret);
        }
 
-static int certify(xret,infile,pkey,x509,dgst,policy,db,serial,startdate,days,
-                  batch,ext_sect,lconf,verbose)
-X509 **xret;
-char *infile;
-EVP_PKEY *pkey;
-X509 *x509;
-const EVP_MD *dgst;
-STACK *policy;
-TXT_DB *db;
-BIGNUM *serial;
-char *startdate;
-int days;
-int batch;
-char *ext_sect;
-LHASH *lconf;
-int verbose;
+static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
+            const EVP_MD *dgst, STACK *policy, TXT_DB *db, BIGNUM *serial,
+            char *startdate, int days, int batch, char *ext_sect, LHASH *lconf,
+                int verbose)
        {
        X509_REQ *req=NULL;
        BIO *in=NULL;
@@ -1377,22 +1350,11 @@ err:
        return(ok);
        }
 
-static int certify_cert(xret,infile,pkey,x509,dgst,policy,db,serial,startdate,
-                       days,batch,ext_sect,lconf,verbose)
-X509 **xret;
-char *infile;
-EVP_PKEY *pkey;
-X509 *x509;
-const EVP_MD *dgst;
-STACK *policy;
-TXT_DB *db;
-BIGNUM *serial;
-char *startdate;
-int days;
-int batch;
-char *ext_sect;
-LHASH *lconf;
-int verbose;
+static int certify_cert(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
+            const EVP_MD *dgst, STACK *policy, TXT_DB *db, BIGNUM *serial,
+            char *startdate, int days, int batch, char *ext_sect, LHASH *lconf,
+                int verbose)
+
        {
        X509 *req=NULL;
        X509_REQ *rreq=NULL;
@@ -1452,22 +1414,9 @@ err:
        return(ok);
        }
 
-static int do_body(xret,pkey,x509,dgst,policy,db,serial,startdate,days,
-                  batch,verbose,req,ext_sect,lconf)
-X509 **xret;
-EVP_PKEY *pkey;
-X509 *x509;
-const EVP_MD *dgst;
-STACK *policy;
-TXT_DB *db;
-BIGNUM *serial;
-char *startdate;
-int days;
-int batch;
-int verbose;
-X509_REQ *req;
-char *ext_sect;
-LHASH *lconf;
+static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
+            STACK *policy, TXT_DB *db, BIGNUM *serial, char *startdate, int days,
+            int batch, int verbose, X509_REQ *req, char *ext_sect, LHASH *lconf)
        {
        X509_NAME *name=NULL,*CAname=NULL,*subject=NULL;
        ASN1_UTCTIME *tm,*tmptm;
@@ -1895,10 +1844,7 @@ err:
        return(ok);
        }
 
-static void write_new_certificate(bp,x, output_der)
-BIO *bp;
-X509 *x;
-int output_der;
+static void write_new_certificate(BIO *bp, X509 *x, int output_der)
        {
        char *f;
        char buf[256];
@@ -1924,21 +1870,9 @@ int output_der;
        BIO_puts(bp,"\n");
        }
 
-static int certify_spkac(xret,infile,pkey,x509,dgst,policy,db,serial,
-                        startdate,days,ext_sect,lconf,verbose)
-X509 **xret;
-char *infile;
-EVP_PKEY *pkey;
-X509 *x509;
-const EVP_MD *dgst;
-STACK *policy;
-TXT_DB *db;
-BIGNUM *serial;
-char *startdate;
-int days;
-char *ext_sect;
-LHASH *lconf;
-int verbose;
+static int certify_spkac(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
+            const EVP_MD *dgst, STACK *policy, TXT_DB *db, BIGNUM *serial,
+            char *startdate, int days, char *ext_sect, LHASH *lconf, int verbose)
        {
        STACK *sk=NULL;
        LHASH *parms=NULL;
@@ -2094,9 +2028,7 @@ err:
        return(ok);
        }
 
-static int fix_data(nid,type)
-int nid;
-int *type;
+static int fix_data(int nid, int *type)
        {
        if (nid == NID_pkcs9_emailAddress)
                *type=V_ASN1_IA5STRING;
@@ -2111,8 +2043,7 @@ int *type;
        return(1);
        }
 
-static int check_time_format(str)
-char *str;
+static int check_time_format(char *str)
        {
        ASN1_UTCTIME tm;
 
@@ -2122,8 +2053,7 @@ char *str;
        return(ASN1_UTCTIME_check(&tm));
        }
 
-static int add_oid_section(hconf)
-LHASH *hconf;
+static int add_oid_section(LHASH *hconf)
 {      
        char *p;
        STACK *sktmp;
@@ -2145,9 +2075,7 @@ LHASH *hconf;
        return 1;
 }
 
-static int do_revoke(x509,db)
-X509 *x509;
-TXT_DB *db;
+static int do_revoke(X509 *x509, TXT_DB *db)
 {
         ASN1_UTCTIME *tm=NULL;
         char *row[DB_NUMBER],**rrow,**irow;
index 1465277..b02b64b 100644 (file)
@@ -77,9 +77,7 @@ static char *ciphers_usage[]={
 NULL
 };
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int ret=1,i;
        int verbose=0;
index 3bb7aae..0c03f5f 100644 (file)
@@ -96,9 +96,7 @@ static X509_CRL *load_crl();
 
 static BIO *bio_out=NULL;
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        X509_CRL *x=NULL;
        int ret=1,i,num,badops=0;
@@ -262,9 +260,7 @@ end:
        EXIT(ret);
        }
 
-static X509_CRL *load_crl(infile, format)
-char *infile;
-int format;
+static X509_CRL *load_crl(char *infile, int format)
        {
        X509_CRL *x=NULL;
        BIO *in=NULL;
index beadc96..aa407b7 100644 (file)
@@ -87,9 +87,7 @@ static int add_certs_from_file();
  * -out arg    - output file - default stdout
  */
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int i,badops=0;
        BIO *in=NULL,*out=NULL;
@@ -288,9 +286,7 @@ end:
  *     number of certs added if successful, -1 if not.
  *----------------------------------------------------------------------
  */
-static int add_certs_from_file(stack,certfile)
-STACK_OF(X509) *stack;
-char *certfile;
+static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile)
        {
        struct stat st;
        BIO *in=NULL;
index eb7462d..2926e55 100644 (file)
@@ -79,9 +79,7 @@ void do_fp(unsigned char *buf,BIO *f,int sep);
 void do_fp();
 #endif
 
-int MAIN(argc,argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        unsigned char *buf=NULL;
        int i,err=0;
@@ -203,10 +201,7 @@ end:
        EXIT(err);
        }
 
-void do_fp(buf,bp,sep)
-unsigned char *buf;
-BIO *bp;
-int sep;
+void do_fp(unsigned char *buf, BIO *bp, int sep)
        {
        int len;
        int i;
index 462570c..0b548ef 100644 (file)
--- a/apps/dh.c
+++ b/apps/dh.c
@@ -81,9 +81,7 @@
  * -C
  */
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        DH *dh=NULL;
        int i,badops=0,text=0;
index 1f57c46..312ed31 100644 (file)
@@ -82,9 +82,7 @@
  * -modulus    - print the DSA public key
  */
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int ret=1;
        DSA *dsa=NULL;
index e01f939..085e484 100644 (file)
@@ -89,9 +89,7 @@ static void MS_CALLBACK dsa_cb(int p, int n, char *arg);
 static void MS_CALLBACK dsa_cb();
 #endif
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        DSA *dsa=NULL;
        int i,badops=0,text=0;
@@ -342,10 +340,7 @@ end:
        EXIT(ret);
        }
 
-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='*';
 
index 00cc336..b561326 100644 (file)
@@ -84,9 +84,7 @@ int set_hex();
 #define BSIZE  (8*1024)
 #define        PROG    enc_main
 
-int MAIN(argc,argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        char *strbuf=NULL;
        unsigned char *buff=NULL,*bufsize=NULL;
@@ -521,10 +519,7 @@ end:
        EXIT(ret);
        }
 
-int set_hex(in,out,size)
-char *in;
-unsigned char *out;
-int size;
+int set_hex(char *in, unsigned char *out, int size)
        {
        int i,n;
        unsigned char j;
index d2b2b3f..ee51aba 100644 (file)
@@ -68,9 +68,7 @@
 #undef PROG
 #define PROG   errstr_main
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int i,ret=0;
        char buf[256];
index 2790f17..8900b4f 100644 (file)
@@ -81,9 +81,7 @@ static void MS_CALLBACK dh_cb();
 static long dh_load_rand();
 #endif
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        char buffer[200];
        DH *dh=NULL;
@@ -191,10 +189,7 @@ end:
        EXIT(ret);
        }
 
-static void MS_CALLBACK dh_cb(p,n,arg)
-int p;
-int n;
-char *arg;
+static void MS_CALLBACK dh_cb(int p, int n, char *arg)
        {
        char c='*';
 
@@ -209,8 +204,7 @@ char *arg;
 #endif
        }
 
-static long dh_load_rand(name)
-char *name;
+static long dh_load_rand(char *name)
        {
        char *p,*n;
        int last;
index 311d950..3e198a2 100644 (file)
@@ -79,9 +79,7 @@ static long dsa_load_rand(char *names);
 static long dsa_load_rand();
 #endif
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        char buffer[200];
        DSA *dsa=NULL;
@@ -214,8 +212,7 @@ end:
        EXIT(ret);
        }
 
-static long dsa_load_rand(name)
-char *name;
+static long dsa_load_rand(char *name)
        {
        char *p,*n;
        int last;
index cdba618..f83bafc 100644 (file)
@@ -82,9 +82,7 @@ static void MS_CALLBACK genrsa_cb();
 static long gr_load_rand();
 #endif
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int ret=1;
        char buffer[200];
@@ -234,10 +232,7 @@ err:
        EXIT(ret);
        }
 
-static void MS_CALLBACK genrsa_cb(p, n, arg)
-int p;
-int n;
-char *arg;
+static void MS_CALLBACK genrsa_cb(int p, int n, char *arg)
        {
        char c='*';
 
@@ -252,8 +247,7 @@ char *arg;
 #endif
        }
 
-static long gr_load_rand(name)
-char *name;
+static long gr_load_rand(char *name)
        {
        char *p,*n;
        int last;
index e87c6c7..3c70e4d 100644 (file)
@@ -70,9 +70,7 @@ static int dump_cert_text(BIO *out, X509 *x);
 static int dump_cert_text();
 #endif
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
 {
        char **args, *infile = NULL, *outfile = NULL;
        BIO *in = NULL, *out = NULL;
@@ -163,9 +161,7 @@ end:
        EXIT(ret);
 }
 
-static int dump_cert_text(out, x)
-BIO *out;
-X509 *x;
+static int dump_cert_text(BIO *out, X509 *x)
 {
         char buf[256];
         X509_NAME_oneline(X509_get_subject_name(x),buf,256);
index dd22aa7..2172420 100644 (file)
@@ -99,8 +99,7 @@ LHASH *config=NULL;
 char *default_config_file=NULL;
 
 #ifdef DEBUG
-static void sig_stop(i)
-int i;
+static void sig_stop(int i)
        {
        char *a=NULL;
 
@@ -113,9 +112,7 @@ int i;
 BIO *bio_err=NULL;
 #endif
 
-int main(Argc,Argv)
-int Argc;
-char *Argv[];
+int main(int Argc, char *Argv[])
        {
        ARGS arg;
 #define PROG_NAME_SIZE 16
@@ -258,10 +255,7 @@ end:
 #define LIST_MESSAGE_DIGEST_COMMANDS "list-message-digest-commands"
 #define LIST_CIPHER_COMMANDS "list-cipher-commands"
 
-static int do_cmd(prog,argc,argv)
-LHASH *prog;
-int argc;
-char *argv[];
+static int do_cmd(LHASH *prog, int argc, char *argv[])
        {
        FUNCTION f,*fp;
        int i,ret=1,tp,nl;
@@ -354,7 +348,7 @@ static int SortFnByName(const void *_f1,const void *_f2)
     return strcmp(f1->name,f2->name);
     }
 
-static LHASH *prog_init()
+static LHASH *prog_init(void)
        {
        LHASH *ret;
        FUNCTION *f;
@@ -372,14 +366,12 @@ static LHASH *prog_init()
        return(ret);
        }
 
-static int MS_CALLBACK cmp(a,b)
-FUNCTION *a,*b;
+static int MS_CALLBACK cmp(FUNCTION *a, FUNCTION *b)
        {
        return(strncmp(a->name,b->name,8));
        }
 
-static unsigned long MS_CALLBACK hash(a)
-FUNCTION *a;
+static unsigned long MS_CALLBACK hash(FUNCTION *a)
        {
        return(lh_strhash(a->name));
        }
index 64e04ac..acbf7bd 100644 (file)
@@ -87,9 +87,7 @@ typedef struct lines_St
        struct lines_st *next;
        } LINES;
 
-int main(argc, argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
        {
        FILE *in;
        RSA *rsa=NULL;
index 96e0379..266bfa8 100644 (file)
@@ -96,9 +96,7 @@ int alg_print();
 int cert_load();
 #endif
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
 {
     char *infile=NULL, *outfile=NULL, *keyname = NULL; 
     char *certfile=NULL;
@@ -440,9 +438,7 @@ if (export_cert) {
     EXIT(ret);
 }
 
-int dump_cert_text (out, x)
-BIO *out;
-X509 *x;
+int dump_cert_text (BIO *out, X509 *x)
 {
        char buf[256];
        X509_NAME_oneline(X509_get_subject_name(x),buf,256);
@@ -456,12 +452,8 @@ X509 *x;
         return 0;
 }
 
-int dump_certs_keys_p12 (out, p12, pass, passlen, options)
-BIO *out;
-PKCS12 *p12;
-unsigned char *pass;
-int passlen;
-int options;
+int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, unsigned char *pass,
+            int passlen, int options)
 {
        STACK *asafes, *bags;
        int i, bagnid;
@@ -493,12 +485,8 @@ int options;
        return 1;
 }
 
-int dump_certs_pkeys_bags (out, bags, pass, passlen, options)
-BIO *out;
-STACK *bags;
-unsigned char *pass;
-int passlen;
-int options;
+int dump_certs_pkeys_bags (BIO *out, STACK *bags, unsigned char *pass,
+            int passlen, int options)
 {
        int i;
        for (i = 0; i < sk_num (bags); i++) {
@@ -509,12 +497,8 @@ int options;
        return 1;
 }
 
-int dump_certs_pkeys_bag (out, bag, pass, passlen, options)
-BIO *out;
-PKCS12_SAFEBAG *bag;
-unsigned char *pass;
-int passlen;
-int options;
+int dump_certs_pkeys_bag (BIO *out, PKCS12_SAFEBAG *bag, unsigned char *pass,
+            int passlen, int options)
 {
        EVP_PKEY *pkey;
        PKCS8_PRIV_KEY_INFO *p8;
@@ -584,9 +568,7 @@ int options;
 
 /* Hope this is OK .... */
 
-int get_cert_chain (cert, chain)
-X509 *cert;
-STACK **chain;
+int get_cert_chain (X509 *cert, STACK **chain)
 {
        X509_STORE *store;
        X509_STORE_CTX store_ctx;
@@ -614,9 +596,7 @@ err:
        return i;
 }      
 
-int alg_print (x, alg)
-BIO *x;
-X509_ALGOR *alg;
+int alg_print (BIO *x, X509_ALGOR *alg)
 {
        PBEPARAM *pbe;
        unsigned char *p;
@@ -630,9 +610,7 @@ X509_ALGOR *alg;
 
 /* Load all certificates from a given file */
 
-int cert_load(in, sk)
-BIO *in;
-STACK *sk;
+int cert_load(BIO *in, STACK *sk)
 {
        int ret;
        X509 *cert;
@@ -647,10 +625,7 @@ STACK *sk;
 
 /* Generalised attribute print: handle PKCS#8 and bag attributes */
 
-int print_attribs (out, attrlst, name)
-BIO *out;
-STACK *attrlst;
-char *name;
+int print_attribs (BIO *out, STACK *attrlst, char *name)
 {
        X509_ATTRIBUTE *attr;
        ASN1_TYPE *av;
@@ -705,10 +680,7 @@ char *name;
        return 1;
 }
 
-void hex_prin(out, buf, len)
-BIO *out;
-unsigned char *buf;
-int len;
+void hex_prin(BIO *out, unsigned char *buf, int len)
 {
        int i;
        for (i = 0; i < len; i++) BIO_printf (out, "%02X ", buf[i]);
index cac75f4..ece2cd7 100644 (file)
@@ -81,9 +81,7 @@
  * -print_certs
  */
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        PKCS7 *p7=NULL;
        int i,badops=0;
index bb3a65a..ce7e318 100644 (file)
@@ -137,9 +137,7 @@ static LHASH *req_conf=NULL;
 #define TYPE_DSA       2
 #define TYPE_DH                3
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
 #ifndef NO_DSA
        DSA *dsa_params=NULL;
@@ -825,10 +823,7 @@ end:
        EXIT(ex);
        }
 
-static int make_REQ(req,pkey,attribs)
-X509_REQ *req;
-EVP_PKEY *pkey;
-int attribs;
+static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, int attribs)
        {
        int ret=0,i;
        unsigned char *p,*q;
@@ -984,14 +979,8 @@ err:
        return(ret);
        }
 
-static int add_DN_object(n,text,def,value,nid,min,max)
-X509_NAME *n;
-char *text;
-char *def;
-char *value;
-int nid;
-int min;
-int max;
+static int add_DN_object(X509_NAME *n, char *text, char *def, char *value,
+            int nid, int min, int max)
        {
        int i,j,ret=0;
        X509_NAME_ENTRY *ne=NULL;
@@ -1044,14 +1033,8 @@ err:
        return(ret);
        }
 
-static int add_attribute_object(n,text,def,value,nid,min,max)
-STACK *n;
-char *text;
-char *def;
-char *value;
-int nid;
-int min;
-int max;
+static int add_attribute_object(STACK *n, char *text, char *def, char *value,
+            int nid, int min, int max)
        {
        int i,z;
        X509_ATTRIBUTE *xa=NULL;
@@ -1135,10 +1118,7 @@ err:
        return(0);
        }
 
-static void MS_CALLBACK req_cb(p,n,arg)
-int p;
-int n;
-char *arg;
+static void MS_CALLBACK req_cb(int p, int n, char *arg)
        {
        char c='*';
 
@@ -1153,10 +1133,7 @@ char *arg;
 #endif
        }
 
-static int req_fix_data(nid,type,len,min,max)
-int nid;
-int *type;
-int len,min,max;
+static int req_fix_data(int nid, int *type, int len, int min, int max)
        {
        if (nid == NID_pkcs9_emailAddress)
                *type=V_ASN1_IA5STRING;
@@ -1189,9 +1166,7 @@ int len,min,max;
        }
 
 /* Check if the end of a string matches 'end' */
-static int check_end(str, end)
-char *str;
-char *end;
+static int check_end(char *str, char *end)
 {
        int elen, slen; 
        char *tmp;
@@ -1202,8 +1177,7 @@ char *end;
        return strcmp(tmp, end);
 }
 
-static int add_oid_section(conf)
-LHASH *conf;
+static int add_oid_section(LHASH *conf)
 {      
        char *p;
        STACK *sktmp;
index c8473d9..e09eeda 100644 (file)
@@ -82,9 +82,7 @@
  * -modulus    - print the RSA key modulus
  */
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int ret=1;
        RSA *rsa=NULL;
index c18ecc3..ad5bc26 100644 (file)
@@ -71,9 +71,7 @@
 int verify_depth=0;
 int verify_error=X509_V_OK;
 
-int MS_CALLBACK verify_callback(ok, ctx)
-int ok;
-X509_STORE_CTX *ctx;
+int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
        {
        char buf[256];
        X509 *err_cert;
@@ -123,10 +121,7 @@ X509_STORE_CTX *ctx;
        return(ok);
        }
 
-int set_cert_stuff(ctx, cert_file, key_file)
-SSL_CTX *ctx;
-char *cert_file;
-char *key_file;
+int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file)
        {
        if (cert_file != NULL)
                {
@@ -181,13 +176,8 @@ char *key_file;
        return(1);
        }
 
-long MS_CALLBACK bio_dump_cb(bio,cmd,argp,argi,argl,ret)
-BIO *bio;
-int cmd;
-const char *argp;
-int argi;
-long argl;
-long ret;
+long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp, int argi,
+            long argl, long ret)
        {
        BIO *out;
 
@@ -210,10 +200,7 @@ long ret;
        return(ret);
        }
 
-void MS_CALLBACK apps_ssl_info_callback(s,where,ret)
-SSL *s;
-int where;
-int ret;
+void MS_CALLBACK apps_ssl_info_callback(SSL *s, int where, int ret)
        {
        char *str;
        int w;
index ffe2d70..20e581e 100644 (file)
@@ -103,7 +103,7 @@ static void print_stuff();
 static BIO *bio_c_out=NULL;
 static int c_quiet=0;
 
-static void sc_usage()
+static void sc_usage(void)
        {
        BIO_printf(bio_err,"usage: s_client args\n");
        BIO_printf(bio_err,"\n");
@@ -137,9 +137,7 @@ static void sc_usage()
 
        }
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int off=0;
        SSL *con=NULL,*con2=NULL;
@@ -657,10 +655,7 @@ end:
        }
 
 
-static void print_stuff(bio,s,full)
-BIO *bio;
-SSL *s;
-int full;
+static void print_stuff(BIO *bio, SSL *s, int full)
        {
        X509 *peer=NULL;
        char *p;
index 8edd8e7..1257ac5 100644 (file)
@@ -120,7 +120,7 @@ static unsigned char dh512_g[]={
        0x02,
        };
 
-static DH *get_dh512()
+static DH *get_dh512(void)
        {
        DH *dh=NULL;
 
@@ -164,7 +164,7 @@ static int s_debug=0;
 static int s_quiet=0;
 
 #if 0
-static void s_server_init()
+static void s_server_init(void)
        {
        cipher=NULL;
        s_server_verify=SSL_VERIFY_NONE;
@@ -185,7 +185,7 @@ static void s_server_init()
        }
 #endif
 
-static void sv_usage()
+static void sv_usage(void)
        {
        BIO_printf(bio_err,"usage: s_server [args ...]\n");
        BIO_printf(bio_err,"\n");
@@ -226,9 +226,7 @@ static int local_argc=0;
 static char **local_argv;
 static int hack=0;
 
-int MAIN(argc, argv)
-int argc;
-char *argv[];
+int MAIN(int argc, char *argv[])
        {
        short port=PORT;
        char *CApath=NULL,*CAfile=NULL;
@@ -533,9 +531,7 @@ end:
        EXIT(ret);
        }
 
-static void print_stats(bio,ssl_ctx)
-BIO *bio;
-SSL_CTX *ssl_ctx;
+static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
        {
        BIO_printf(bio,"%4ld items in the session cache\n",
                SSL_CTX_sess_number(ssl_ctx));
@@ -560,10 +556,7 @@ SSL_CTX *ssl_ctx;
                SSL_CTX_sess_get_cache_size(ssl_ctx));
        }
 
-static int sv_body(hostname, s, context)
-char *hostname;
-int s;
-char *context;
+static int sv_body(char *hostname, int s, char *context)
        {
        char *buf=NULL;
        fd_set readfds;
@@ -779,7 +772,7 @@ err:
        return(ret);
        }
 
-static void close_accept_socket()
+static void close_accept_socket(void)
        {
        BIO_printf(bio_err,"shutdown accept socket\n");
        if (accept_socket >= 0)
@@ -788,8 +781,7 @@ static void close_accept_socket()
                }
        }
 
-static int init_ssl_connection(con)
-SSL *con;
+static int init_ssl_connection(SSL *con)
        {
        int i;
        const char *str;
@@ -844,7 +836,7 @@ SSL *con;
        }
 
 #ifndef NO_DH
-static DH *load_dh_param()
+static DH *load_dh_param(void)
        {
        DH *ret=NULL;
        BIO *bio;
@@ -859,9 +851,7 @@ err:
 #endif
 
 #if 0
-static int load_CA(ctx,file)
-SSL_CTX *ctx;
-char *file;
+static int load_CA(SSL_CTX *ctx, char *file)
        {
        FILE *in;
        X509 *x=NULL;
@@ -881,10 +871,7 @@ char *file;
        }
 #endif
 
-static int www_body(hostname, s, context)
-char *hostname;
-int s;
-char *context;
+static int www_body(char *hostname, int s, char *context)
        {
        char *buf=NULL;
        int ret=1;
@@ -1226,10 +1213,7 @@ err:
        return(ret);
        }
 
-static RSA MS_CALLBACK *tmp_rsa_cb(s,export,keylength)
-SSL *s;
-int export;
-int keylength;
+static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int export, int keylength)
        {
        static RSA *rsa_tmp=NULL;
 
index 1580140..19b9abb 100644 (file)
@@ -93,11 +93,8 @@ static FARPROC lpTopWndProc=NULL;
 static FARPROC lpTopHookProc=NULL;
 extern HINSTANCE _hInstance;  /* nice global CRT provides */
 
-static LONG FAR PASCAL topHookProc(hwnd,message,wParam,lParam)
-HWND hwnd;
-UINT message;
-WPARAM wParam;
-LPARAM lParam;
+static LONG FAR PASCAL topHookProc(HWND hwnd, UINT message, WPARAM wParam,
+            LPARAM lParam)
        {
        if (hwnd == topWnd)
                {
@@ -122,7 +119,7 @@ static BOOL CALLBACK enumproc(HWND hwnd,LPARAM lParam)
 #endif /* WIN32 */
 #endif /* WINDOWS */
 
-void sock_cleanup()
+void sock_cleanup(void)
        {
 #ifdef WINDOWS
        if (wsa_init_done)
@@ -134,7 +131,7 @@ void sock_cleanup()
 #endif
        }
 
-int sock_init()
+int sock_init(void)
        {
 #ifdef WINDOWS
        if (!wsa_init_done)
@@ -165,10 +162,7 @@ int sock_init()
        return(1);
        }
 
-int init_client(sock, host, port)
-int *sock;
-char *host;
-int port;
+int init_client(int *sock, char *host, int port)
        {
        unsigned char ip[4];
        short p=0;
@@ -181,10 +175,7 @@ int port;
        return(init_client_ip(sock,ip,port));
        }
 
-int init_client_ip(sock, ip, port)
-int *sock;
-unsigned char ip[4];
-int port;
+int init_client_ip(int *sock, unsigned char ip[4], int port)
        {
        unsigned long addr;
        struct sockaddr_in them;
@@ -215,8 +206,7 @@ int port;
        return(1);
        }
 
-int nbio_sock_error(sock)
-int sock;
+int nbio_sock_error(int sock)
        {
        int j,i,size;
 
@@ -228,10 +218,7 @@ int sock;
                return(j);
        }
 
-int nbio_init_client_ip(sock, ip, port)
-int *sock;
-unsigned char ip[4];
-int port;
+int nbio_init_client_ip(int *sock, unsigned char ip[4], int port)
        {
        unsigned long addr;
        struct sockaddr_in them;
@@ -280,11 +267,7 @@ int port;
                return(1);
        }
 
-int do_server(port, ret, cb, context)
-int port;
-int *ret;
-int (*cb)();
-char *context;
+int do_server(int port, int *ret, int (*cb)(), char *context)
        {
        int sock;
        char *name;
@@ -316,10 +299,7 @@ char *context;
                }
        }
 
-int init_server_long(sock, port, ip)
-int *sock;
-int port;
-char *ip;
+int init_server_long(int *sock, int port, char *ip)
        {
        int ret=0;
        struct sockaddr_in server;
@@ -369,17 +349,12 @@ err:
        return(ret);
        }
 
-int init_server(sock,port)
-int *sock;
-int port;
+int init_server(int *sock, int port)
        {
        return(init_server_long(sock, port, NULL));
        }
 
-int do_accept(acc_sock, sock, host)
-int acc_sock;
-int *sock;
-char **host;
+int do_accept(int acc_sock, int *sock, char **host)
        {
        int ret,i;
        struct hostent *h1,*h2;
@@ -465,11 +440,8 @@ end:
        return(1);
        }
 
-int extract_host_port(str,host_ptr,ip,port_ptr)
-char *str;
-char **host_ptr;
-unsigned char *ip;
-short *port_ptr;
+int extract_host_port(char *str, char **host_ptr, unsigned char *ip,
+            short *port_ptr)
        {
        char *h,*p;
 
@@ -493,9 +465,7 @@ err:
        return(0);
        }
 
-int host_ip(str,ip)
-char *str;
-unsigned char ip[4];
+int host_ip(char *str, unsigned char ip[4])
        {
        unsigned int in[4]; 
        int i;
@@ -541,9 +511,7 @@ err:
        return(0);
        }
 
-int extract_port(str,port_ptr)
-char *str;
-short *port_ptr;
+int extract_port(char *str, short *port_ptr)
        {
        int i;
        struct servent *s;
@@ -575,8 +543,7 @@ static struct ghbn_cache_st
 static unsigned long ghbn_hits=0L;
 static unsigned long ghbn_miss=0L;
 
-static struct hostent *GetHostByName(name)
-char *name;
+static struct hostent *GetHostByName(char *name)
        {
        struct hostent *ret;
        int i,lowi=0;
@@ -616,11 +583,7 @@ char *name;
        }
 
 #ifndef MSDOS
-int spawn(argc, argv, in, out)
-int argc;
-char **argv;
-int *in;
-int *out;
+int spawn(int argc, char **argv, int *in, int *out)
        {
        int pid;
 #define CHILD_READ     p1[0]
index 0d4d509..1e335ef 100644 (file)
@@ -190,7 +190,7 @@ static int t_nbio=0;
 static int exitNow = 0;                /* Set when it's time to exit main */
 #endif
 
-static void s_time_init()
+static void s_time_init(void)
        {
        host=SSL_CONNECT_NAME;
        t_cert_file=NULL;
@@ -218,7 +218,7 @@ static void s_time_init()
 /***********************************************************************
  * usage - display usage message
  */
-static void s_time_usage()
+static void s_time_usage(void)
 {
        static char umsg[] = "\
 -time arg     - max number of seconds to collect data, default %d\n\
@@ -250,9 +250,7 @@ static void s_time_usage()
  *
  * Returns 0 if ok, -1 on bad args
  */
-static int parseArgs(argc,argv)
-int argc;
-char **argv;
+static int parseArgs(int argc, char **argv)
 {
     int badop = 0;
 
@@ -377,8 +375,7 @@ bad:
 #define START  0
 #define STOP   1
 
-static double tm_Time_F(s)
-int s;
+static double tm_Time_F(int s)
        {
        static double ret;
 #ifdef TIMES
@@ -412,10 +409,7 @@ int s;
  * MAIN - main processing area for client
  *                     real name depends on MONOLITH
  */
-int
-MAIN(argc,argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        double totalTime = 0.0;
        int nConn = 0;
@@ -639,9 +633,7 @@ end:
  * Returns:
  *             SSL *   = the connection pointer.
  */
-static SSL *
-doConnection(scon)
-SSL *scon;
+static SSL *doConnection(SSL *scon)
        {
        BIO *conn;
        SSL *serverCon;
index fccd805..816040d 100644 (file)
--- a/apps/sc.c
+++ b/apps/sc.c
@@ -110,7 +110,7 @@ static void print_stuff();
 static BIO *bio_c_out=NULL;
 static int c_quiet=0;
 
-static void sc_usage()
+static void sc_usage(void)
        {
        BIO_printf(bio_err,"usage: client args\n");
        BIO_printf(bio_err,"\n");
@@ -143,9 +143,7 @@ static void sc_usage()
 
        }
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int off=0;
        SSL *con=NULL,*con2=NULL;
index 4a1860d..c1b4979 100644 (file)
@@ -89,9 +89,7 @@ static SSL_SESSION *load_sess_id(char *file, int format);
 static SSL_SESSION *load_sess_id();
 #endif
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        SSL_SESSION *x=NULL;
        int ret=1,i,num,badops=0;
@@ -271,9 +269,7 @@ end:
        EXIT(ret);
        }
 
-static SSL_SESSION *load_sess_id(infile, format)
-char *infile;
-int format;
+static SSL_SESSION *load_sess_id(char *infile, int format)
        {
        SSL_SESSION *x=NULL;
        BIO *in=NULL;
index 4a337be..6c88a1c 100644 (file)
@@ -204,8 +204,7 @@ static SIGRETTYPE sig_done(int sig);
 static SIGRETTYPE sig_done();
 #endif
 
-static SIGRETTYPE sig_done(sig)
-int sig;
+static SIGRETTYPE sig_done(int sig)
        {
        signal(SIGALRM,sig_done);
        run=0;
@@ -218,8 +217,7 @@ int sig;
 #define START  0
 #define STOP   1
 
-static double Time_F(s)
-int s;
+static double Time_F(int s)
        {
        double ret;
 #ifdef TIMES
@@ -255,9 +253,7 @@ int s;
 #endif
        }
 
-int MAIN(argc,argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        unsigned char *buf=NULL,*buf2=NULL;
        int ret=1;
@@ -1183,10 +1179,7 @@ end:
        EXIT(ret);
        }
 
-static void print_message(s,num,length)
-char *s;
-long num;
-int length;
+static void print_message(char *s, long num, int length)
        {
 #ifdef SIGALRM
        BIO_printf(bio_err,"Doing %s for %ds on %d size blocks: ",s,SECONDS,length);
@@ -1201,12 +1194,8 @@ int length;
 #endif
        }
 
-static void pkey_print_message(str,str2,num,bits,tm)
-char *str;
-char *str2;
-long num;
-int bits;
-int tm;
+static void pkey_print_message(char *str, char *str2, long num, int bits,
+            int tm)
        {
 #ifdef SIGALRM
        BIO_printf(bio_err,"Doing %d bit %s %s's for %ds: ",bits,str,str2,tm);
index 2179110..1a324c3 100644 (file)
@@ -78,9 +78,7 @@ static int check();
 
 static int v_verbose=0;
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int i,ret=1;
        char *CApath=NULL,*CAfile=NULL;
@@ -154,9 +152,7 @@ end:
        EXIT(ret);
        }
 
-static int check(ctx,file)
-X509_STORE *ctx;
-char *file;
+static int check(X509_STORE *ctx, char *file)
        {
        X509 *x=NULL;
        BIO *in=NULL;
@@ -210,9 +206,7 @@ end:
        return(ret);
        }
 
-static int MS_CALLBACK cb(ok,ctx)
-int ok;
-X509_STORE_CTX *ctx;
+static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
        {
        char buf[256];
 
index 0de9c49..fd46e17 100644 (file)
@@ -66,9 +66,7 @@
 #undef PROG
 #define PROG   version_main
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int i,ret=0;
        int cflags=0,version=0,date=0,options=0,platform=0;
index 2a7188f..f1975dc 100644 (file)
@@ -135,9 +135,7 @@ static int x509_certify ();
 
 static int reqfile=0;
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        int ret=1;
        X509_REQ *req=NULL;
@@ -704,16 +702,9 @@ end:
        EXIT(ret);
        }
 
-static int x509_certify(ctx,CAfile,digest,x,xca,pkey,serialfile,create,days)
-X509_STORE *ctx;
-char *CAfile;
-const EVP_MD *digest;
-X509 *x;
-X509 *xca;
-EVP_PKEY *pkey;
-char *serialfile;
-int create;
-int days;
+static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
+            X509 *x, X509 *xca, EVP_PKEY *pkey, char *serialfile, int create,
+            int days)
        {
        int ret=0;
        BIO *io=NULL;
@@ -859,9 +850,7 @@ end:
        return(ret);
        }
 
-static int MS_CALLBACK callb(ok, ctx)
-int ok;
-X509_STORE_CTX *ctx;
+static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx)
        {
        char buf[256];
        int err;
@@ -894,9 +883,7 @@ X509_STORE_CTX *ctx;
                }
        }
 
-static EVP_PKEY *load_key(file, format)
-char *file;
-int format;
+static EVP_PKEY *load_key(char *file, int format)
        {
        BIO *key=NULL;
        EVP_PKEY *pkey=NULL;
@@ -949,9 +936,7 @@ end:
        return(pkey);
        }
 
-static X509 *load_cert(file, format)
-char *file;
-int format;
+static X509 *load_cert(char *file, int format)
        {
        ASN1_HEADER *ah=NULL;
        BUF_MEM *buf=NULL;
@@ -1038,11 +1023,7 @@ end:
        }
 
 /* self sign */
-static int sign(x, pkey, days, digest)
-X509 *x;
-EVP_PKEY *pkey;
-int days;
-const EVP_MD *digest;
+static int sign(X509 *x, EVP_PKEY *pkey, int days, const EVP_MD *digest)
        {
 
        EVP_PKEY *pktmp;
index 275de43..cd4d835 100644 (file)
@@ -64,9 +64,7 @@
  * ASN1err(ASN1_F_D2I_ASN1_BIT_STRING,ASN1_R_EXPECTING_A_BIT_STRING);
  */
 
-int i2d_ASN1_BIT_STRING(a,pp)
-ASN1_BIT_STRING *a;
-unsigned char **pp;
+int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
        {
        int ret,j,r,bits,len;
        unsigned char *p,*d;
@@ -116,10 +114,8 @@ unsigned char **pp;
        return(r);
        }
 
-ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(a, pp, length)
-ASN1_BIT_STRING **a;
-unsigned char **pp;
-long length;
+ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
+            long length)
        {
        ASN1_BIT_STRING *ret=NULL;
        unsigned char *p,*s;
@@ -187,10 +183,7 @@ err:
 
 /* These next 2 functions from Goetz Babin-Ebell <babinebell@trustcenter.de>
  */
-int ASN1_BIT_STRING_set_bit(a,n,value)
-ASN1_BIT_STRING *a;
-int n;
-int value;
+int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value)
        {
        int w,v,iv;
        unsigned char *c;
@@ -220,9 +213,7 @@ int value;
        return(1);
        }
 
-int ASN1_BIT_STRING_get_bit(a,n)
-ASN1_BIT_STRING *a;
-int n;
+int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n)
        {
        int w,v;
 
index 32a4fc2..2cb322a 100644 (file)
 /* ASN1err(ASN1_F_D2I_ASN1_BMPSTRING,ASN1_R_EXPECTING_AN_INTEGER);
  */
 
-int i2d_ASN1_BMPSTRING(a, pp)
-ASN1_BMPSTRING *a;
-unsigned char **pp;
+int i2d_ASN1_BMPSTRING(ASN1_BMPSTRING *a, unsigned char **pp)
        {
        return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
                V_ASN1_BMPSTRING,V_ASN1_UNIVERSAL));
        }
 
-ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(a, pp, length)
-ASN1_BMPSTRING **a;
-unsigned char **pp;
-long length;
+ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(ASN1_BMPSTRING **a, unsigned char **pp,
+            long length)
        {
        ASN1_BMPSTRING *ret=NULL;
 
index 41a95aa..fc55a92 100644 (file)
@@ -64,9 +64,7 @@
  * ASN1err(ASN1_F_D2I_ASN1_BOOLEAN,ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
  */
 
-int i2d_ASN1_BOOLEAN(a,pp)
-int a;
-unsigned char **pp;
+int i2d_ASN1_BOOLEAN(int a, unsigned char **pp)
        {
        int r;
        unsigned char *p;
@@ -81,10 +79,7 @@ unsigned char **pp;
        return(r);
        }
 
-int d2i_ASN1_BOOLEAN(a, pp, length)
-int *a;
-unsigned char **pp;
-long length;
+int d2i_ASN1_BOOLEAN(int *a, unsigned char **pp, long length)
        {
        int ret= -1;
        unsigned char *p;
index 9828a55..fdfe9ea 100644 (file)
@@ -83,11 +83,8 @@ static int asn1_collate_primative();
 
 /* type is a 'bitmap' of acceptable string types.
  */
-ASN1_STRING *d2i_ASN1_type_bytes(a, pp, length, type)
-ASN1_STRING **a;
-unsigned char **pp;
-long length;
-int type;
+ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp,
+            long length, int type)
        {
        ASN1_STRING *ret=NULL;
        unsigned char *p,*s;
@@ -150,11 +147,7 @@ err:
        return(NULL);
        }
 
-int i2d_ASN1_bytes(a, pp, tag, xclass)
-ASN1_STRING *a;
-unsigned char **pp;
-int tag;
-int xclass;
+int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass)
        {
        int ret,r,constructed;
        unsigned char *p;
@@ -180,12 +173,8 @@ int xclass;
        return(r);
        }
 
-ASN1_STRING *d2i_ASN1_bytes(a, pp, length, Ptag, Pclass)
-ASN1_STRING **a;
-unsigned char **pp;
-long length;
-int Ptag;
-int Pclass;
+ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp, long length,
+            int Ptag, int Pclass)
        {
        ASN1_STRING *ret=NULL;
        unsigned char *p,*s;
@@ -277,9 +266,7 @@ err:
  * them into the one struture that is then returned */
 /* There have been a few bug fixes for this function from
  * Paul Keogh <paul.keogh@sse.ie>, many thanks to him */
-static int asn1_collate_primative(a,c)
-ASN1_STRING *a;
-ASN1_CTX *c;
+static int asn1_collate_primative(ASN1_STRING *a, ASN1_CTX *c)
        {
        ASN1_STRING *os=NULL;
        BUF_MEM b;
index d952836..465986e 100644 (file)
 #define HEADER_SIZE   8
 
 #ifndef NO_FP_API
-char *ASN1_d2i_fp(xnew,d2i,in,x)
-char *(*xnew)();
-char *(*d2i)();
-FILE *in;
-unsigned char **x;
+char *ASN1_d2i_fp(char *(*xnew)(), char *(*d2i)(), FILE *in,
+            unsigned char **x)
         {
         BIO *b;
         char *ret;
@@ -85,11 +82,8 @@ unsigned char **x;
         }
 #endif
 
-char *ASN1_d2i_bio(xnew,d2i,in,x)
-char *(*xnew)();
-char *(*d2i)();
-BIO *in;
-unsigned char **x;
+char *ASN1_d2i_bio(char *(*xnew)(), char *(*d2i)(), BIO *in,
+            unsigned char **x)
        {
        BUF_MEM *b;
        unsigned char *p;
index 8ddb65b..20cde71 100644 (file)
 #include "x509.h"
 #include "buffer.h"
 
-int ASN1_digest(i2d,type,data,md,len)
-int (*i2d)();
-EVP_MD *type;
-char *data;
-unsigned char *md;
-unsigned int *len;
+int ASN1_digest(int (*i2d)(), EVP_MD *type, char *data, unsigned char *md,
+            unsigned int *len)
        {
        EVP_MD_CTX ctx;
        int i;
index 961b4cb..cf57482 100644 (file)
 
 #define READ_CHUNK   2048
 
-char *ASN1_dup(i2d,d2i,x)
-int (*i2d)();
-char *(*d2i)();
-char *x;
+char *ASN1_dup(int (*i2d)(), char *(*d2i)(), char *x)
        {
        unsigned char *b,*p;
        long i;
index c369317..0f8ad84 100644 (file)
@@ -65,9 +65,7 @@
 /* ASN1err(ASN1_F_D2I_ASN1_ENUMERATED,ASN1_R_EXPECTING_AN_ENUMERATED);
  */
 
-int i2d_ASN1_ENUMERATED(a,pp)
-ASN1_ENUMERATED *a;
-unsigned char **pp;
+int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **pp)
        {
        int pad=0,ret,r,i,t;
        unsigned char *p,*pt,*n,pb=0;
@@ -118,10 +116,8 @@ unsigned char **pp;
        return(r);
        }
 
-ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(a, pp, length)
-ASN1_ENUMERATED **a;
-unsigned char **pp;
-long length;
+ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp,
+            long length)
        {
        ASN1_ENUMERATED *ret=NULL;
        unsigned char *p,*to,*s;
@@ -196,9 +192,7 @@ err:
        return(NULL);
        }
 
-int ASN1_ENUMERATED_set(a,v)
-ASN1_ENUMERATED *a;
-long v;
+int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v)
        {
        int i,j,k;
        unsigned char buf[sizeof(long)+1];
@@ -238,8 +232,7 @@ long v;
        return(1);
        }
 
-long ASN1_ENUMERATED_get(a)
-ASN1_ENUMERATED *a;
+long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a)
        {
        int neg=0,i;
        long r=0;
@@ -268,9 +261,7 @@ ASN1_ENUMERATED *a;
        return(r);
        }
 
-ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(bn,ai)
-BIGNUM *bn;
-ASN1_ENUMERATED *ai;
+ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai)
        {
        ASN1_ENUMERATED *ret;
        int len,j;
@@ -295,9 +286,7 @@ err:
        return(NULL);
        }
 
-BIGNUM *ASN1_ENUMERATED_to_BN(ai,bn)
-ASN1_ENUMERATED *ai;
-BIGNUM *bn;
+BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn)
        {
        BIGNUM *ret;
 
index 3d37e9d..7992739 100644 (file)
  * ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME,ASN1_R_EXPECTING_A_GENERALIZEDTIME);
  */
 
-int i2d_ASN1_GENERALIZEDTIME(a,pp)
-ASN1_GENERALIZEDTIME *a;
-unsigned char **pp;
+int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **pp)
        {
        return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
                V_ASN1_GENERALIZEDTIME,V_ASN1_UNIVERSAL));
        }
 
 
-ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(a, pp, length)
-ASN1_GENERALIZEDTIME **a;
-unsigned char **pp;
-long length;
+ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a,
+            unsigned char **pp, long length)
        {
        ASN1_GENERALIZEDTIME *ret=NULL;
 
@@ -103,8 +99,7 @@ err:
        return(NULL);
        }
 
-int ASN1_GENERALIZEDTIME_check(d)
-ASN1_GENERALIZEDTIME *d;
+int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d)
        {
        static int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
        static int max[9]={99, 99,12,31,23,59,59,12,59};
@@ -157,9 +152,7 @@ err:
        return(0);
        }
 
-int ASN1_GENERALIZEDTIME_set_string(s,str)
-ASN1_GENERALIZEDTIME *s;
-char *str;
+int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str)
        {
        ASN1_GENERALIZEDTIME t;
 
@@ -179,9 +172,8 @@ char *str;
                return(0);
        }
 
-ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(s, t)
-ASN1_GENERALIZEDTIME *s;
-time_t t;
+ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
+            time_t t)
        {
        char *p;
        struct tm *ts;
index e9de283..d1bf08a 100644 (file)
@@ -68,9 +68,7 @@
  * ASN1err(ASN1_F_ASN1_HEADER_NEW,ERR_R_BAD_GET_ASN1_OBJECT_CALL);
  */
 
-int i2d_ASN1_HEADER(a,pp)
-ASN1_HEADER *a;
-unsigned char **pp;
+int i2d_ASN1_HEADER(ASN1_HEADER *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -85,10 +83,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-ASN1_HEADER *d2i_ASN1_HEADER(a,pp,length)
-ASN1_HEADER **a;
-unsigned char **pp;
-long length;
+ASN1_HEADER *d2i_ASN1_HEADER(ASN1_HEADER **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,ASN1_HEADER *,ASN1_HEADER_new);
 
@@ -107,7 +103,7 @@ long length;
         M_ASN1_D2I_Finish(a,ASN1_HEADER_free,ASN1_F_D2I_ASN1_HEADER);
        }
 
-ASN1_HEADER *ASN1_HEADER_new()
+ASN1_HEADER *ASN1_HEADER_new(void)
        {
        ASN1_HEADER *ret=NULL;
        ASN1_CTX c;
@@ -120,8 +116,7 @@ ASN1_HEADER *ASN1_HEADER_new()
         M_ASN1_New_Error(ASN1_F_ASN1_HEADER_NEW);
        }
 
-void ASN1_HEADER_free(a)
-ASN1_HEADER *a;
+void ASN1_HEADER_free(ASN1_HEADER *a)
        {
        if (a == NULL) return;
        ASN1_OCTET_STRING_free(a->header);
index 66c3df6..f010ec1 100644 (file)
 #include "asn1_mac.h"
 
 #ifndef NO_FP_API
-int ASN1_i2d_fp(i2d,out,x)
-int (*i2d)();
-FILE *out;
-unsigned char *x;
+int ASN1_i2d_fp(int (*i2d)(), FILE *out, unsigned char *x)
         {
         BIO *b;
         int ret;
@@ -82,10 +79,7 @@ unsigned char *x;
         }
 #endif
 
-int ASN1_i2d_bio(i2d,out,x)
-int (*i2d)();
-BIO *out;
-unsigned char *x;
+int ASN1_i2d_bio(int (*i2d)(), BIO *out, unsigned char *x)
        {
        char *b;
        unsigned char *p;
index e847efe..acfc855 100644 (file)
@@ -63,9 +63,7 @@
 /* ASN1err(ASN1_F_D2I_ASN1_INTEGER,ASN1_R_EXPECTING_AN_INTEGER);
  */
 
-int i2d_ASN1_INTEGER(a,pp)
-ASN1_INTEGER *a;
-unsigned char **pp;
+int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp)
        {
        int pad=0,ret,r,i,t;
        unsigned char *p,*pt,*n,pb=0;
@@ -116,10 +114,8 @@ unsigned char **pp;
        return(r);
        }
 
-ASN1_INTEGER *d2i_ASN1_INTEGER(a, pp, length)
-ASN1_INTEGER **a;
-unsigned char **pp;
-long length;
+ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp,
+            long length)
        {
        ASN1_INTEGER *ret=NULL;
        unsigned char *p,*to,*s;
@@ -194,9 +190,7 @@ err:
        return(NULL);
        }
 
-int ASN1_INTEGER_set(a,v)
-ASN1_INTEGER *a;
-long v;
+int ASN1_INTEGER_set(ASN1_INTEGER *a, long v)
        {
        int i,j,k;
        unsigned char buf[sizeof(long)+1];
@@ -236,8 +230,7 @@ long v;
        return(1);
        }
 
-long ASN1_INTEGER_get(a)
-ASN1_INTEGER *a;
+long ASN1_INTEGER_get(ASN1_INTEGER *a)
        {
        int neg=0,i;
        long r=0;
@@ -266,9 +259,7 @@ ASN1_INTEGER *a;
        return(r);
        }
 
-ASN1_INTEGER *BN_to_ASN1_INTEGER(bn,ai)
-BIGNUM *bn;
-ASN1_INTEGER *ai;
+ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai)
        {
        ASN1_INTEGER *ret;
        int len,j;
@@ -293,9 +284,7 @@ err:
        return(NULL);
        }
 
-BIGNUM *ASN1_INTEGER_to_BN(ai,bn)
-ASN1_INTEGER *ai;
-BIGNUM *bn;
+BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai, BIGNUM *bn)
        {
        BIGNUM *ret;
 
index 513625c..9610855 100644 (file)
@@ -73,12 +73,12 @@ static  ASN1_METHOD bit_string_meth={
        (char *(*)())   ASN1_STRING_new,
        (void (*)())    ASN1_STRING_free};
 
-ASN1_METHOD *ASN1_IA5STRING_asn1_meth()
+ASN1_METHOD *ASN1_IA5STRING_asn1_meth(void)
        {
        return(&ia5string_meth);
        }
 
-ASN1_METHOD *ASN1_BIT_STRING_asn1_meth()
+ASN1_METHOD *ASN1_BIT_STRING_asn1_meth(void)
        {
        return(&bit_string_meth);
        }
index 9eff095..ef77bb0 100644 (file)
@@ -67,9 +67,7 @@
  * ASN1err(ASN1_F_I2T_ASN1_OBJECT,ASN1_R_BAD_OBJECT_HEADER);
  */
 
-int i2d_ASN1_OBJECT(a, pp)
-ASN1_OBJECT *a;
-unsigned char **pp;
+int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp)
        {
        unsigned char *p;
 
@@ -87,11 +85,7 @@ unsigned char **pp;
        return(a->length);
        }
 
-int a2d_ASN1_OBJECT(out,olen,buf,num)
-unsigned char *out;
-int olen;
-const char *buf;
-int num;
+int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num)
        {
        int i,first,len=0,c;
        char tmp[24];
@@ -181,10 +175,7 @@ err:
        return(0);
        }
 
-int i2t_ASN1_OBJECT(buf,buf_len,a)
-char *buf;
-int buf_len;
-ASN1_OBJECT *a;
+int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a)
        {
        int i,idx=0,n=0,len,nid;
        unsigned long l;
@@ -257,9 +248,7 @@ ASN1_OBJECT *a;
        return(n);
        }
 
-int i2a_ASN1_OBJECT(bp,a)
-BIO *bp;
-ASN1_OBJECT *a;
+int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a)
        {
        char buf[80];
        int i;
@@ -272,10 +261,8 @@ ASN1_OBJECT *a;
        return(i);
        }
 
-ASN1_OBJECT *d2i_ASN1_OBJECT(a, pp, length)
-ASN1_OBJECT **a;
-unsigned char **pp;
-long length; 
+ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp,
+            long length)
        {
        ASN1_OBJECT *ret=NULL;
        unsigned char *p;
@@ -331,7 +318,7 @@ err:
        return(NULL);
        }
 
-ASN1_OBJECT *ASN1_OBJECT_new()
+ASN1_OBJECT *ASN1_OBJECT_new(void)
        {
        ASN1_OBJECT *ret;
 
@@ -350,8 +337,7 @@ ASN1_OBJECT *ASN1_OBJECT_new()
        return(ret);
        }
 
-void ASN1_OBJECT_free(a)
-ASN1_OBJECT *a;
+void ASN1_OBJECT_free(ASN1_OBJECT *a)
        {
        if (a == NULL) return;
        if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS)
@@ -372,11 +358,8 @@ ASN1_OBJECT *a;
                Free(a);
        }
 
-ASN1_OBJECT *ASN1_OBJECT_create(nid,data,len,sn,ln)
-int nid;
-unsigned char *data;
-int len;
-char *sn,*ln;
+ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
+            char *sn, char *ln)
        {
        ASN1_OBJECT o;
 
index 5954c7b..2509175 100644 (file)
 /* ASN1err(ASN1_F_D2I_ASN1_OCTET_STRING,ASN1_R_EXPECTING_AN_OCTET_STRING);
  */
 
-int i2d_ASN1_OCTET_STRING(a, pp)
-ASN1_OCTET_STRING *a;
-unsigned char **pp;
+int i2d_ASN1_OCTET_STRING(ASN1_OCTET_STRING *a, unsigned char **pp)
        {
        return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
                V_ASN1_OCTET_STRING,V_ASN1_UNIVERSAL));
        }
 
-ASN1_OCTET_STRING *d2i_ASN1_OCTET_STRING(a, pp, length)
-ASN1_OCTET_STRING **a;
-unsigned char **pp;
-long length;
+ASN1_OCTET_STRING *d2i_ASN1_OCTET_STRING(ASN1_OCTET_STRING **a,
+            unsigned char **pp, long length)
        {
        ASN1_OCTET_STRING *ret=NULL;
 
index 9fa7561..babb571 100644 (file)
  * ASN1err(ASN1_F_D2I_ASN1_PRINT_TYPE,ASN1_R_TAG_VALUE_TOO_HIGH);
  */
 
-int i2d_ASN1_IA5STRING(a,pp)
-ASN1_IA5STRING *a;
-unsigned char **pp;
+int i2d_ASN1_IA5STRING(ASN1_IA5STRING *a, unsigned char **pp)
        { return(M_i2d_ASN1_IA5STRING(a,pp)); }
 
-ASN1_IA5STRING *d2i_ASN1_IA5STRING(a,pp,l)
-ASN1_IA5STRING **a;
-unsigned char **pp;
-long l;
+ASN1_IA5STRING *d2i_ASN1_IA5STRING(ASN1_IA5STRING **a, unsigned char **pp,
+            long l)
        { return(M_d2i_ASN1_IA5STRING(a,pp,l)); }
 
-ASN1_T61STRING *d2i_ASN1_T61STRING(a,pp,l)
-ASN1_T61STRING **a;
-unsigned char **pp;
-long l;
+ASN1_T61STRING *d2i_ASN1_T61STRING(ASN1_T61STRING **a, unsigned char **pp,
+            long l)
        { return(M_d2i_ASN1_T61STRING(a,pp,l)); }
 
-ASN1_PRINTABLESTRING *d2i_ASN1_PRINTABLESTRING(a,pp,l)
-ASN1_PRINTABLESTRING **a;
-unsigned char **pp;
-long l;
-       { return(M_d2i_ASN1_PRINTABLESTRING(a,pp,l)); }
+ASN1_PRINTABLESTRING *d2i_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING **a,
+            unsigned char **pp, long l)
+       { return(M_d2i_ASN1_PRINTABLESTRING(a,pp,
+            l)); }
 
-int i2d_ASN1_PRINTABLE(a,pp)
-ASN1_STRING *a;
-unsigned char **pp;
+int i2d_ASN1_PRINTABLE(ASN1_STRING *a, unsigned char **pp)
        { return(M_i2d_ASN1_PRINTABLE(a,pp)); }
 
-ASN1_STRING *d2i_ASN1_PRINTABLE(a,pp,l)
-ASN1_STRING **a;
-unsigned char **pp;
-long l;
+ASN1_STRING *d2i_ASN1_PRINTABLE(ASN1_STRING **a, unsigned char **pp,
+            long l)
        { return(M_d2i_ASN1_PRINTABLE(a,pp,l)); }
 
-int ASN1_PRINTABLE_type(s,len)
-unsigned char *s;
-int len;
+int ASN1_PRINTABLE_type(unsigned char *s, int len)
        {
        int c;
        int ia5=0;
@@ -131,8 +118,7 @@ int len;
        return(V_ASN1_PRINTABLESTRING);
        }
 
-int ASN1_UNIVERSALSTRING_to_string(s)
-ASN1_UNIVERSALSTRING *s;
+int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s)
        {
        int i;
        unsigned char *p;
@@ -160,24 +146,16 @@ ASN1_UNIVERSALSTRING *s;
        }
 
 
-int i2d_DIRECTORYSTRING(a,pp)
-ASN1_STRING *a;
-unsigned char **pp;
+int i2d_DIRECTORYSTRING(ASN1_STRING *a, unsigned char **pp)
        { return(M_i2d_DIRECTORYSTRING(a,pp)); }
 
-ASN1_STRING *d2i_DIRECTORYSTRING(a,pp,l)
-ASN1_STRING **a;
-unsigned char **pp;
-long l;
+ASN1_STRING *d2i_DIRECTORYSTRING(ASN1_STRING **a, unsigned char **pp,
+            long l)
        { return(M_d2i_DIRECTORYSTRING(a,pp,l)); }
 
-int i2d_DISPLAYTEXT(a,pp)
-ASN1_STRING *a;
-unsigned char **pp;
+int i2d_DISPLAYTEXT(ASN1_STRING *a, unsigned char **pp)
        { return(M_i2d_DISPLAYTEXT(a,pp)); }
 
-ASN1_STRING *d2i_DISPLAYTEXT(a,pp,l)
-ASN1_STRING **a;
-unsigned char **pp;
-long l;
+ASN1_STRING *d2i_DISPLAYTEXT(ASN1_STRING **a, unsigned char **pp,
+            long l)
        { return(M_d2i_DISPLAYTEXT(a,pp,l)); }
index 34000ec..406c68f 100644 (file)
@@ -84,14 +84,9 @@ static int SetBlobCmp(const void *elem1, const void *elem2 )
     return b1->cbData-b2->cbData;
     }
 
-int i2d_ASN1_SET(a,pp,func,ex_tag,ex_class,is_set)
-STACK *a;
-unsigned char **pp;
-int (*func)();
-int ex_tag;
-int ex_class;
-int is_set;    /* if TRUE, then sort the contents (i.e. it isn't a SEQUENCE) */
-
+/* int is_set:  if TRUE, then sort the contents (i.e. it isn't a SEQUENCE)    */
+int i2d_ASN1_SET(STACK *a, unsigned char **pp, int (*func)(), int ex_tag,
+            int ex_class, int is_set)
        {
        int ret=0,r;
        int i;
@@ -158,14 +153,8 @@ SetBlob
         return(r);
         }
 
-STACK *d2i_ASN1_SET(a,pp,length,func,free_func,ex_tag,ex_class)
-STACK **a;
-unsigned char **pp;
-long length;
-char *(*func)();
-void (*free_func)();
-int ex_tag;
-int ex_class;
+STACK *d2i_ASN1_SET(STACK **a, unsigned char **pp, long length,
+            char *(*func)(), void (*free_func)(), int ex_tag, int ex_class)
        {
        ASN1_CTX c;
        STACK *ret=NULL;
index d3ae78b..7ce246c 100644 (file)
 #include "objects.h"
 #include "buffer.h"
 
-int ASN1_sign(i2d,algor1,algor2,signature,data,pkey,type)
-int (*i2d)();
-X509_ALGOR *algor1;
-X509_ALGOR *algor2;
-ASN1_BIT_STRING *signature;
-char *data;
-EVP_PKEY *pkey;
-const EVP_MD *type;
+int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
+            ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey,
+            const EVP_MD *type)
        {
        EVP_MD_CTX ctx;
        unsigned char *p,*buf_in=NULL,*buf_out=NULL;
index 953ed60..495f081 100644 (file)
@@ -66,9 +66,7 @@
 #include "cryptlib.h"
 #include "asn1.h"
 
-int i2d_ASN1_TIME(a,pp)
-ASN1_TIME *a;
-unsigned char **pp;
+int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **pp)
        {
        if(a->type == V_ASN1_UTCTIME || a->type == V_ASN1_GENERALIZEDTIME)
                                return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
@@ -78,10 +76,7 @@ unsigned char **pp;
        }
 
 
-ASN1_TIME *d2i_ASN1_TIME(a, pp, length)
-ASN1_TIME **a;
-unsigned char **pp;
-long length;
+ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, unsigned char **pp, long length)
        {
        unsigned char tag;
        tag = **pp & ~V_ASN1_CONSTRUCTED;
@@ -94,9 +89,7 @@ long length;
        }
 
 
-ASN1_TIME *ASN1_TIME_set(s, t)
-ASN1_TIME *s;
-time_t t;
+ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
        {
        struct tm *ts;
 #if defined(THREADS) && !defined(WIN32)
index 2f8a161..5ccd5de 100644 (file)
@@ -70,9 +70,7 @@ static void ASN1_TYPE_component_free(ASN1_TYPE *a);
 static void ASN1_TYPE_component_free();
 #endif
 
-int i2d_ASN1_TYPE(a,pp)
-ASN1_TYPE *a;
-unsigned char **pp;
+int i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **pp)
        {
        int r=0;
 
@@ -150,10 +148,7 @@ unsigned char **pp;
        return(r);
        }
 
-ASN1_TYPE *d2i_ASN1_TYPE(a,pp,length)
-ASN1_TYPE **a;
-unsigned char **pp;
-long length;
+ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length)
        {
        ASN1_TYPE *ret=NULL;
        unsigned char *q,*p,*max;
@@ -280,7 +275,7 @@ err:
        return(NULL);
        }
 
-ASN1_TYPE *ASN1_TYPE_new()
+ASN1_TYPE *ASN1_TYPE_new(void)
        {
        ASN1_TYPE *ret=NULL;
        ASN1_CTX c;
@@ -292,16 +287,14 @@ ASN1_TYPE *ASN1_TYPE_new()
        M_ASN1_New_Error(ASN1_F_ASN1_TYPE_NEW);
        }
 
-void ASN1_TYPE_free(a)
-ASN1_TYPE *a;
+void ASN1_TYPE_free(ASN1_TYPE *a)
        {
        if (a == NULL) return;
        ASN1_TYPE_component_free(a);
        Free((char *)(char *)a);
        }
 
-int ASN1_TYPE_get(a)
-ASN1_TYPE *a;
+int ASN1_TYPE_get(ASN1_TYPE *a)
        {
        if (a->value.ptr != NULL)
                return(a->type);
@@ -309,10 +302,7 @@ ASN1_TYPE *a;
                return(0);
        }
 
-void ASN1_TYPE_set(a,type,value)
-ASN1_TYPE *a;
-int type;
-char *value;
+void ASN1_TYPE_set(ASN1_TYPE *a, int type, char *value)
        {
        if (a->value.ptr != NULL)
                ASN1_TYPE_component_free(a);
@@ -320,8 +310,7 @@ char *value;
        a->value.ptr=value;
        }
 
-static void ASN1_TYPE_component_free(a)
-ASN1_TYPE *a;
+static void ASN1_TYPE_component_free(ASN1_TYPE *a)
        {
        if (a == NULL) return;
 
index ddd1a40..291c0fd 100644 (file)
  * ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ASN1_R_EXPECTING_A_UTCTIME);
  */
 
-int i2d_ASN1_UTCTIME(a,pp)
-ASN1_UTCTIME *a;
-unsigned char **pp;
+int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp)
        {
        return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
                V_ASN1_UTCTIME,V_ASN1_UNIVERSAL));
        }
 
 
-ASN1_UTCTIME *d2i_ASN1_UTCTIME(a, pp, length)
-ASN1_UTCTIME **a;
-unsigned char **pp;
-long length;
+ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, unsigned char **pp,
+            long length)
        {
        ASN1_UTCTIME *ret=NULL;
 
@@ -101,8 +97,7 @@ err:
        return(NULL);
        }
 
-int ASN1_UTCTIME_check(d)
-ASN1_UTCTIME *d;
+int ASN1_UTCTIME_check(ASN1_UTCTIME *d)
        {
        static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
        static int max[8]={99,12,31,23,59,59,12,59};
@@ -152,9 +147,7 @@ err:
        return(0);
        }
 
-int ASN1_UTCTIME_set_string(s,str)
-ASN1_UTCTIME *s;
-char *str;
+int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str)
        {
        ASN1_UTCTIME t;
 
@@ -174,9 +167,7 @@ char *str;
                return(0);
        }
 
-ASN1_UTCTIME *ASN1_UTCTIME_set(s, t)
-ASN1_UTCTIME *s;
-time_t t;
+ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
        {
        char *p;
        struct tm *ts;
index 2657aba..2babbe7 100644 (file)
 /* ASN1err(ASN1_F_D2I_ASN1_UTF8STRING,ERR_R_MALLOC_FAILURE);
  */
 
-int i2d_ASN1_UTF8STRING(a, pp)
-ASN1_UTF8STRING *a;
-unsigned char **pp;
+int i2d_ASN1_UTF8STRING(ASN1_UTF8STRING *a, unsigned char **pp)
        {
        return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
                V_ASN1_UTF8STRING,V_ASN1_UNIVERSAL));
        }
 
-ASN1_UTF8STRING *d2i_ASN1_UTF8STRING(a, pp, length)
-ASN1_UTF8STRING **a;
-unsigned char **pp;
-long length;
+ASN1_UTF8STRING *d2i_ASN1_UTF8STRING(ASN1_UTF8STRING **a, unsigned char **pp,
+            long length)
        {
        ASN1_UTF8STRING *ret=NULL;
 
index dc5db92..fc27110 100644 (file)
 #include "buffer.h"
 #include "evp.h"
 
-int ASN1_verify(i2d,a,signature,data,pkey)
-int (*i2d)();
-X509_ALGOR *a;
-ASN1_BIT_STRING *signature;
-char *data;
-EVP_PKEY *pkey;
+int ASN1_verify(int (*i2d)(), X509_ALGOR *a, ASN1_BIT_STRING *signature,
+            char *data, EVP_PKEY *pkey)
        {
        EVP_MD_CTX ctx;
        const EVP_MD *type;
index 288be17..2e5a709 100644 (file)
 /* ASN1err(ASN1_F_D2I_ASN1_VISIBLESTRING,ERR_R_MALLOC_FAILURE);
  */
 
-int i2d_ASN1_VISIBLESTRING(a, pp)
-ASN1_VISIBLESTRING *a;
-unsigned char **pp;
+int i2d_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING *a, unsigned char **pp)
        {
        return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
                V_ASN1_VISIBLESTRING,V_ASN1_UNIVERSAL));
        }
 
-ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(a, pp, length)
-ASN1_VISIBLESTRING **a;
-unsigned char **pp;
-long length;
+ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING **a,
+            unsigned char **pp, long length)
        {
        ASN1_VISIBLESTRING *ret=NULL;
 
index c5a898f..7d82170 100644 (file)
@@ -306,7 +306,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
 
 #endif
 
-void ERR_load_ASN1_strings()
+void ERR_load_ASN1_strings(void)
        {
        static int init=1;
 
index a18c7e7..8c5d2d8 100644 (file)
@@ -71,9 +71,7 @@ static void asn1_put_length();
 
 const char *ASN1_version="ASN.1" OPENSSL_VERSION_PTEXT;
 
-int ASN1_check_infinite_end(p,len)
-unsigned char **p;
-long len;
+int ASN1_check_infinite_end(unsigned char **p, long len)
        {
        /* If there is 0 or 1 byte left, the length check should pick
         * things up */
@@ -88,12 +86,8 @@ long len;
        }
 
 
-int ASN1_get_object(pp, plength, ptag, pclass, omax)
-unsigned char **pp;
-long *plength;
-int *ptag;
-int *pclass;
-long omax;
+int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass,
+            long omax)
        {
        int i,ret;
        long l;
@@ -152,11 +146,7 @@ err:
        return(0x80);
        }
 
-static int asn1_get_length(pp,inf,rl,max)
-unsigned char **pp;
-int *inf;
-long *rl;
-int max;
+static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max)
        {
        unsigned char *p= *pp;
        long ret=0;
@@ -193,12 +183,8 @@ int max;
 
 /* class 0 is constructed
  * constructed == 2 for indefinitle length constructed */
-void ASN1_put_object(pp,constructed,length,tag,xclass)
-unsigned char **pp;
-int constructed;
-int length;
-int tag;
-int xclass;
+void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag,
+            int xclass)
        {
        unsigned char *p= *pp;
        int i;
@@ -224,9 +210,7 @@ int xclass;
        *pp=p;
        }
 
-static void asn1_put_length(pp, length)
-unsigned char **pp;
-int length;
+static void asn1_put_length(unsigned char **pp, int length)
        {
        unsigned char *p= *pp;
        int i,l;
@@ -249,10 +233,7 @@ int length;
        *pp=p;
        }
 
-int ASN1_object_size(constructed, length, tag)
-int constructed;
-int length;
-int tag;
+int ASN1_object_size(int constructed, int length, int tag)
        {
        int ret;
 
@@ -280,8 +261,7 @@ int tag;
        return(ret);
        }
 
-int asn1_Finish(c)
-ASN1_CTX *c;
+int asn1_Finish(ASN1_CTX *c)
        {
        if ((c->inf == (1|V_ASN1_CONSTRUCTED)) && (!c->eos))
                {
@@ -300,9 +280,7 @@ ASN1_CTX *c;
        return(1);
        }
 
-int asn1_GetSequence(c,length)
-ASN1_CTX *c;
-long *length;
+int asn1_GetSequence(ASN1_CTX *c, long *length)
        {
        unsigned char *q;
 
@@ -331,8 +309,7 @@ long *length;
        return(1);
        }
 
-ASN1_STRING *ASN1_STRING_dup(str)
-ASN1_STRING *str;
+ASN1_STRING *ASN1_STRING_dup(ASN1_STRING *str)
        {
        ASN1_STRING *ret;
 
@@ -347,10 +324,7 @@ ASN1_STRING *str;
        return(ret);
        }
 
-int ASN1_STRING_set(str,data,len)
-ASN1_STRING *str;
-unsigned char *data;
-int len;
+int ASN1_STRING_set(ASN1_STRING *str, unsigned char *data, int len)
        {
        char *c;
 
@@ -385,14 +359,13 @@ int len;
        return(1);
        }
 
-ASN1_STRING *ASN1_STRING_new()
+ASN1_STRING *ASN1_STRING_new(void)
        {
        return(ASN1_STRING_type_new(V_ASN1_OCTET_STRING));
        }
 
 
-ASN1_STRING *ASN1_STRING_type_new(type)
-int type;
+ASN1_STRING *ASN1_STRING_type_new(int type)
        {
        ASN1_STRING *ret;
 
@@ -409,16 +382,14 @@ int type;
        return(ret);
        }
 
-void ASN1_STRING_free(a)
-ASN1_STRING *a;
+void ASN1_STRING_free(ASN1_STRING *a)
        {
        if (a == NULL) return;
        if (a->data != NULL) Free((char *)a->data);
        Free((char *)a);
        }
 
-int ASN1_STRING_cmp(a,b)
-ASN1_STRING *a,*b;
+int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b)
        {
        int i;
 
@@ -435,9 +406,7 @@ ASN1_STRING *a,*b;
                return(i);
        }
 
-void asn1_add_error(address,offset)
-unsigned char *address;
-int offset;
+void asn1_add_error(unsigned char *address, int offset)
        {
        char buf1[16],buf2[16];
 
index d62be7d..ab5521a 100644 (file)
@@ -72,12 +72,8 @@ static int asn1_print_info();
 static int asn1_parse2();
 #endif
 
-static int asn1_print_info(bp, tag, xclass, constructed,indent)
-BIO *bp;
-int tag;
-int xclass;
-int constructed;
-int indent;
+static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
+            int indent)
        {
        static const char fmt[]="%-18s";
        static const char fmt2[]="%2d %-15s";
@@ -165,22 +161,13 @@ err:
        return(0);
        }
 
-int ASN1_parse(bp, pp, len, indent)
-BIO *bp;
-unsigned char *pp;
-long len;
-int indent;
+int ASN1_parse(BIO *bp, unsigned char *pp, long len, int indent)
        {
        return(asn1_parse2(bp,&pp,len,0,0,indent));
        }
 
-static int asn1_parse2(bp, pp, length, offset, depth, indent)
-BIO *bp;
-unsigned char **pp;
-long length;
-int offset;
-int depth;
-int indent;
+static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset,
+            int depth, int indent)
        {
        unsigned char *p,*ep,*tot,*op,*opp;
        long len;
index 6e0dd95..c094d64 100644 (file)
 
 /* Turn an ASN1 encoded SEQUENCE OF into a STACK of structures */
 
-STACK *ASN1_seq_unpack(buf, len, d2i, free_func)
-unsigned char *buf;
-int len;
-char *(*d2i)();
-void (*free_func)();
+STACK *ASN1_seq_unpack(unsigned char *buf, int len, char *(*d2i)(),
+            void (*free_func)())
 {
     STACK *sk;
     unsigned char *pbuf;
@@ -83,11 +80,8 @@ void (*free_func)();
  * Malloc'ed buffer
  */
 
-unsigned char *ASN1_seq_pack(safes, i2d, buf, len)
-STACK *safes;
-int (*i2d)();
-unsigned char **buf;
-int *len;
+unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf,
+            int *len)
 {
        int safelen;
        unsigned char *safe, *p;
@@ -110,9 +104,7 @@ int *len;
 
 /* Extract an ASN1 object from an ASN1_STRING */
 
-char *ASN1_unpack_string (oct, d2i)
-ASN1_STRING *oct;
-char *(*d2i)();
+char *ASN1_unpack_string (ASN1_STRING *oct, char *(*d2i)())
 {
        unsigned char *p;
        char *ret;
@@ -125,10 +117,7 @@ char *(*d2i)();
 
 /* Pack an ASN1 object into an ASN1_STRING */
 
-ASN1_STRING *ASN1_pack_string (obj, i2d, oct)
-char *obj;
-int (*i2d)();
-ASN1_STRING **oct;
+ASN1_STRING *ASN1_pack_string (char *obj, int (*i2d)(), ASN1_STRING **oct)
 {
        unsigned char *p;
        ASN1_STRING *octmp;
index f2236fc..4fea5af 100644 (file)
  * ASN1err(ASN1_F_I2D_DHPARAMS,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
  */
 
-DH *d2i_DHparams(a,pp,length)
-DH **a;
-unsigned char **pp;
-long length;
+DH *d2i_DHparams(DH **a, unsigned char **pp, long length)
        {
        int i=ERR_R_NESTED_ASN1_ERROR;
        ASN1_INTEGER *bs=NULL;
index fc2961b..2f3b6b6 100644 (file)
  * ASN1err(ASN1_F_I2D_DSAPARAMS,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
  */
 
-DSA *d2i_DSAparams(a,pp,length)
-DSA **a;
-unsigned char **pp;
-long length;
+DSA *d2i_DSAparams(DSA **a, unsigned char **pp, long length)
        {
        int i=ERR_R_NESTED_ASN1_ERROR;
        ASN1_INTEGER *bs=NULL;
index 6774035..0fee334 100644 (file)
 #include "objects.h"
 #include "x509.h"
 
-EVP_PKEY *d2i_PrivateKey(type,a,pp,length)
-int type;
-EVP_PKEY **a;
-unsigned char **pp;
-long length;
+EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp,
+            long length)
        {
        EVP_PKEY *ret;
 
index eb572ac..d89c6e2 100644 (file)
 #include "objects.h"
 #include "x509.h"
 
-EVP_PKEY *d2i_PublicKey(type,a,pp,length)
-int type;
-EVP_PKEY **a;
-unsigned char **pp;
-long length;
+EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,
+            long length)
        {
        EVP_PKEY *ret;
 
index a276a1d..3a4267b 100644 (file)
@@ -75,15 +75,12 @@ static ASN1_METHOD method={
         (char *(*)())RSA_new,
         (void (*)()) RSA_free};
 
-ASN1_METHOD *RSAPrivateKey_asn1_meth()
+ASN1_METHOD *RSAPrivateKey_asn1_meth(void)
        {
        return(&method);
        }
 
-RSA *d2i_RSAPrivateKey(a,pp,length)
-RSA **a;
-unsigned char **pp;
-long length;
+RSA *d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length)
        {
        int i=ASN1_R_PARSING;
        ASN1_INTEGER *bs=NULL;
index a4e2c22..5a98e55 100644 (file)
  * ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
  */
 
-RSA *d2i_RSAPublicKey(a,pp,length)
-RSA **a;
-unsigned char **pp;
-long length;
+RSA *d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length)
        {
        int i=ASN1_R_PARSING;
        ASN1_INTEGER *bs=NULL;
index 8499702..b318b1e 100644 (file)
  * ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_PARSING);
  */
 
-DSA *d2i_DSAPrivateKey(a,pp,length)
-DSA **a;
-unsigned char **pp;
-long length;
+DSA *d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length)
        {
        int i=ASN1_R_PARSING;
        ASN1_INTEGER *bs=NULL;
index ecf6407..c7b7ad0 100644 (file)
  * ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
  */
 
-DSA *d2i_DSAPublicKey(a,pp,length)
-DSA **a;
-unsigned char **pp;
-long length;
+DSA *d2i_DSAPublicKey(DSA **a, unsigned char **pp, long length)
        {
        int i=ASN1_R_PARSING;
        ASN1_INTEGER *bs=NULL;
index 4153d1b..8197fcd 100644 (file)
 #include "asn1.h"
 #include "asn1_mac.h"
 
-int ASN1_TYPE_set_octetstring(a,data,len)
-ASN1_TYPE *a;
-unsigned char *data;
-int len;
+int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len)
        {
        ASN1_STRING *os;
 
@@ -74,10 +71,9 @@ int len;
        return(1);
        }
 
-int ASN1_TYPE_get_octetstring(a,data,max_len)
-ASN1_TYPE *a;
-unsigned char *data;
-int max_len; /* for returned value */
+/* int max_len:  for returned value    */
+int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data,
+            int max_len)
        {
        int ret,num;
        unsigned char *p;
@@ -97,11 +93,8 @@ int max_len; /* for returned value */
        return(ret);
        }
 
-int ASN1_TYPE_set_int_octetstring(a,num,data,len)
-ASN1_TYPE *a;
-long num;
-unsigned char *data;
-int len;
+int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data,
+            int len)
        {
        int n,size;
        ASN1_OCTET_STRING os,*osp;
@@ -137,11 +130,9 @@ int len;
 
 /* we return the actual length..., num may be missing, in which
  * case, set it to zero */
-int ASN1_TYPE_get_int_octetstring(a,num,data,max_len)
-ASN1_TYPE *a;
-long *num;
-unsigned char *data;
-int max_len; /* for returned value */
+/* int max_len:  for returned value    */
+int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num, unsigned char *data,
+            int max_len)
        {
        int ret= -1,n;
        ASN1_INTEGER *ai=NULL;
index 515f1dc..392e6b0 100644 (file)
@@ -63,9 +63,7 @@
 
 /* Based on a_int.c: equivalent ENUMERATED functions */
 
-int i2a_ASN1_ENUMERATED(bp, a)
-BIO *bp;
-ASN1_ENUMERATED *a;
+int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a)
        {
        int i,n=0;
        static const char *h="0123456789ABCDEF";
@@ -98,11 +96,7 @@ err:
        return(-1);
        }
 
-int a2i_ASN1_ENUMERATED(bp,bs,buf,size)
-BIO *bp;
-ASN1_ENUMERATED *bs;
-char *buf;
-int size;
+int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size)
        {
        int ret=0;
        int i,j,k,m,n,again,bufsize;
index a877e0c..85ec6ce 100644 (file)
@@ -61,9 +61,7 @@
 #include "buffer.h"
 #include "x509.h"
 
-int i2a_ASN1_INTEGER(bp, a)
-BIO *bp;
-ASN1_INTEGER *a;
+int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a)
        {
        int i,n=0;
        static const char *h="0123456789ABCDEF";
@@ -96,11 +94,7 @@ err:
        return(-1);
        }
 
-int a2i_ASN1_INTEGER(bp,bs,buf,size)
-BIO *bp;
-ASN1_INTEGER *bs;
-char *buf;
-int size;
+int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
        {
        int ret=0;
        int i,j,k,m,n,again,bufsize;
index e7ca97f..ab7a7b1 100644 (file)
 #include "buffer.h"
 #include "x509.h"
 
-int i2a_ASN1_STRING(bp, a, type)
-BIO *bp;
-ASN1_STRING *a;
-int type;
+int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type)
        {
        int i,n=0;
        static const char *h="0123456789ABCDEF";
@@ -97,11 +94,7 @@ err:
        return(-1);
        }
 
-int a2i_ASN1_STRING(bp,bs,buf,size)
-BIO *bp;
-ASN1_STRING *bs;
-char *buf;
-int size;
+int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
        {
        int ret=0;
        int i,j,k,m,n,again,bufsize;
index a1afa46..690ba1a 100644 (file)
@@ -67,9 +67,7 @@
  * ASN1err(ASN1_F_X509_DHPARAMS_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_DHparams(a,pp)
-DH *a;
-unsigned char **pp;
+int i2d_DHparams(DH *a, unsigned char **pp)
        {
        BIGNUM *num[3];
        ASN1_INTEGER bs;
index 0b7d554..402ed19 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_DSAPARAMS,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_DSAparams(a,pp)
-DSA *a;
-unsigned char **pp;
+int i2d_DSAparams(DSA *a, unsigned char **pp)
        {
        BIGNUM *num[3];
        ASN1_INTEGER bs;
index b6b821d..f173c9a 100644 (file)
@@ -62,9 +62,7 @@
 #include "evp.h"
 #include "objects.h"
 
-int i2d_PrivateKey(a,pp)
-EVP_PKEY *a;
-unsigned char **pp;
+int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
        {
 #ifndef NO_RSA
        if (a->type == EVP_PKEY_RSA)
index 1b85425..8139175 100644 (file)
@@ -62,9 +62,7 @@
 #include "evp.h"
 #include "objects.h"
 
-int i2d_PublicKey(a,pp)
-EVP_PKEY *a;
-unsigned char **pp;
+int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp)
        {
        switch (a->type)
                {
index 78312db..cfd1fc7 100644 (file)
@@ -68,9 +68,7 @@
  * ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
  */
 
-int i2d_RSAPrivateKey(a,pp)
-RSA *a;
-unsigned char **pp;
+int i2d_RSAPrivateKey(RSA *a, unsigned char **pp)
        {
        BIGNUM *num[9];
        unsigned char data[1];
index 4bcebaa..4f0a022 100644 (file)
@@ -68,9 +68,7 @@
  * ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
  */
 
-int i2d_RSAPublicKey(a,pp)
-RSA *a;
-unsigned char **pp;
+int i2d_RSAPublicKey(RSA *a, unsigned char **pp)
        {
        BIGNUM *num[2];
        ASN1_INTEGER bs;
index 6e95305..7374f7e 100644 (file)
@@ -67,9 +67,7 @@
  * ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
  */
 
-int i2d_DSAPrivateKey(a,pp)
-DSA *a;
-unsigned char **pp;
+int i2d_DSAPrivateKey(DSA *a, unsigned char **pp)
        {
        BIGNUM *num[6];
        unsigned char data[1];
index 5cf2877..bfa40f3 100644 (file)
@@ -67,9 +67,7 @@
  * ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
  */
 
-int i2d_DSAPublicKey(a,pp)
-DSA *a;
-unsigned char **pp;
+int i2d_DSAPublicKey(DSA *a, unsigned char **pp)
        {
        BIGNUM *num[4];
        ASN1_INTEGER bs;
index d9bf417..edab9fe 100644 (file)
@@ -92,10 +92,7 @@ static NETSCAPE_PKEY *NETSCAPE_PKEY_new();
 static void NETSCAPE_PKEY_free();
 #endif
 
-int i2d_Netscape_RSA(a,pp,cb)
-RSA *a;
-unsigned char **pp;
-int (*cb)();
+int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)())
        {
        int i,j,l[6];
        NETSCAPE_PKEY *pkey;
@@ -204,11 +201,7 @@ err:
        return(ret);
        }
 
-RSA *d2i_Netscape_RSA(a,pp,length,cb)
-RSA **a;
-unsigned char **pp;
-long length;
-int (*cb)();
+RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)())
        {
        RSA *ret=NULL;
        ASN1_OCTET_STRING *os=NULL;
@@ -235,11 +228,8 @@ int (*cb)();
        M_ASN1_D2I_Finish(a,RSA_free,ASN1_F_D2I_NETSCAPE_RSA);
        }
 
-RSA *d2i_Netscape_RSA_2(a,pp,length,cb)
-RSA **a;
-unsigned char **pp;
-long length;
-int (*cb)();
+RSA *d2i_Netscape_RSA_2(RSA **a, unsigned char **pp, long length,
+            int (*cb)())
        {
        NETSCAPE_PKEY *pkey=NULL;
        RSA *ret=NULL;
@@ -306,9 +296,7 @@ err:
        return(ret);
        }
 
-static int i2d_NETSCAPE_PKEY(a,pp)
-NETSCAPE_PKEY *a;
-unsigned char **pp;
+static int i2d_NETSCAPE_PKEY(NETSCAPE_PKEY *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -326,10 +314,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-static NETSCAPE_PKEY *d2i_NETSCAPE_PKEY(a,pp,length)
-NETSCAPE_PKEY **a;
-unsigned char **pp;
-long length;
+static NETSCAPE_PKEY *d2i_NETSCAPE_PKEY(NETSCAPE_PKEY **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,NETSCAPE_PKEY *,NETSCAPE_PKEY_new);
 
@@ -341,7 +327,7 @@ long length;
        M_ASN1_D2I_Finish(a,NETSCAPE_PKEY_free,ASN1_F_D2I_NETSCAPE_PKEY);
        }
 
-static NETSCAPE_PKEY *NETSCAPE_PKEY_new()
+static NETSCAPE_PKEY *NETSCAPE_PKEY_new(void)
        {
        NETSCAPE_PKEY *ret=NULL;
        ASN1_CTX c;
@@ -354,8 +340,7 @@ static NETSCAPE_PKEY *NETSCAPE_PKEY_new()
        M_ASN1_New_Error(ASN1_F_NETSCAPE_PKEY_NEW);
        }
 
-static void NETSCAPE_PKEY_free(a)
-NETSCAPE_PKEY *a;
+static void NETSCAPE_PKEY_free(NETSCAPE_PKEY *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
index 5f95cfd..ba43be5 100644 (file)
@@ -70,9 +70,7 @@
  * ASN1err(ASN1_F_D2I_NETSCAPE_CERT_SEQUENCE,ERR_R_MALLOC_FAILURE);
  */
 
-int i2d_NETSCAPE_CERT_SEQUENCE(a,pp)
-NETSCAPE_CERT_SEQUENCE *a;
-unsigned char **pp;
+int i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **pp)
 {
        int v = 0;
        M_ASN1_I2D_vars(a);
@@ -89,7 +87,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
 }
 
-NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new()
+NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void)
 {
        NETSCAPE_CERT_SEQUENCE *ret=NULL;
        ASN1_CTX c;
@@ -101,10 +99,8 @@ NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new()
        M_ASN1_New_Error(ASN1_F_NETSCAPE_CERT_SEQUENCE_NEW);
 }
 
-NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(a,pp,length)
-NETSCAPE_CERT_SEQUENCE **a;
-unsigned char **pp;
-long length;
+NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a,
+            unsigned char **pp, long length)
 {
        M_ASN1_D2I_vars(a,NETSCAPE_CERT_SEQUENCE *,
                                        NETSCAPE_CERT_SEQUENCE_new);
@@ -116,8 +112,7 @@ long length;
        M_ASN1_D2I_Finish(a, NETSCAPE_CERT_SEQUENCE_free, ASN1_F_D2I_NETSCAPE_CERT_SEQUENCE);
 }
 
-void NETSCAPE_CERT_SEQUENCE_free (a)
-NETSCAPE_CERT_SEQUENCE *a;
+void NETSCAPE_CERT_SEQUENCE_free (NETSCAPE_CERT_SEQUENCE *a)
 {
        if (a == NULL) return;
        ASN1_OBJECT_free(a->type);
index 5396a5a..b0de0d8 100644 (file)
@@ -70,9 +70,7 @@
  *ASN1err(ASN1_F_D2I_PBEPARAM,ASN1_R_DECODE_ERROR)
  */
 
-int i2d_PBEPARAM(a, pp)
-PBEPARAM *a;
-unsigned char **pp;
+int i2d_PBEPARAM(PBEPARAM *a, unsigned char **pp)
 {
        M_ASN1_I2D_vars(a);
        M_ASN1_I2D_len (a->salt, i2d_ASN1_OCTET_STRING);
@@ -85,7 +83,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
 }
 
-PBEPARAM *PBEPARAM_new()
+PBEPARAM *PBEPARAM_new(void)
 {
        PBEPARAM *ret=NULL;
        ASN1_CTX c;
@@ -96,10 +94,7 @@ PBEPARAM *PBEPARAM_new()
        M_ASN1_New_Error(ASN1_F_PBEPARAM_NEW);
 }
 
-PBEPARAM *d2i_PBEPARAM(a,pp,length)
-PBEPARAM **a;
-unsigned char **pp;
-long length;
+PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, unsigned char **pp, long length)
 {
        M_ASN1_D2I_vars(a,PBEPARAM *,PBEPARAM_new);
        M_ASN1_D2I_Init();
@@ -109,8 +104,7 @@ long length;
        M_ASN1_D2I_Finish(a, PBEPARAM_free, ASN1_F_D2I_PBEPARAM);
 }
 
-void PBEPARAM_free (a)
-PBEPARAM *a;
+void PBEPARAM_free (PBEPARAM *a)
 {
        if(a==NULL) return;
        ASN1_OCTET_STRING_free(a->salt);
@@ -120,11 +114,8 @@ PBEPARAM *a;
 
 /* Return an algorithm identifier for a PKCS#5 PBE algorithm */
 
-X509_ALGOR *PKCS5_pbe_set(alg, iter, salt, saltlen)
-int alg;
-int iter;
-unsigned char *salt;
-int saltlen;
+X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt,
+            int saltlen)
 {
        unsigned char *pdata, *ptmp;
        int plen;
index b81703e..2e49602 100644 (file)
@@ -70,9 +70,7 @@
  *ASN1err(ASN1_F_D2I_PBKDF2PARAM,ASN1_R_DECODE_ERROR)
  */
 
-int i2d_PBE2PARAM(a, pp)
-PBE2PARAM *a;
-unsigned char **pp;
+int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **pp)
 {
        M_ASN1_I2D_vars(a);
        M_ASN1_I2D_len (a->keyfunc, i2d_X509_ALGOR);
@@ -86,7 +84,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
 }
 
-PBE2PARAM *PBE2PARAM_new()
+PBE2PARAM *PBE2PARAM_new(void)
 {
        PBE2PARAM *ret=NULL;
        ASN1_CTX c;
@@ -97,10 +95,7 @@ PBE2PARAM *PBE2PARAM_new()
        M_ASN1_New_Error(ASN1_F_PBE2PARAM_NEW);
 }
 
-PBE2PARAM *d2i_PBE2PARAM(a,pp,length)
-PBE2PARAM **a;
-unsigned char **pp;
-long length;
+PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, unsigned char **pp, long length)
 {
        M_ASN1_D2I_vars(a,PBE2PARAM *,PBE2PARAM_new);
        M_ASN1_D2I_Init();
@@ -110,8 +105,7 @@ long length;
        M_ASN1_D2I_Finish(a, PBE2PARAM_free, ASN1_F_D2I_PBE2PARAM);
 }
 
-void PBE2PARAM_free (a)
-PBE2PARAM *a;
+void PBE2PARAM_free (PBE2PARAM *a)
 {
        if(a==NULL) return;
        X509_ALGOR_free(a->keyfunc);
@@ -119,9 +113,7 @@ PBE2PARAM *a;
        Free ((char *)a);
 }
 
-int i2d_PBKDF2PARAM(a, pp)
-PBKDF2PARAM *a;
-unsigned char **pp;
+int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **pp)
 {
        M_ASN1_I2D_vars(a);
        M_ASN1_I2D_len (a->salt, i2d_ASN1_OCTET_STRING);
@@ -139,7 +131,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
 }
 
-PBKDF2PARAM *PBKDF2PARAM_new()
+PBKDF2PARAM *PBKDF2PARAM_new(void)
 {
        PBKDF2PARAM *ret=NULL;
        ASN1_CTX c;
@@ -152,10 +144,8 @@ PBKDF2PARAM *PBKDF2PARAM_new()
        M_ASN1_New_Error(ASN1_F_PBKDF2PARAM_NEW);
 }
 
-PBKDF2PARAM *d2i_PBKDF2PARAM(a,pp,length)
-PBKDF2PARAM **a;
-unsigned char **pp;
-long length;
+PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, unsigned char **pp,
+            long length)
 {
        M_ASN1_D2I_vars(a,PBKDF2PARAM *,PBKDF2PARAM_new);
        M_ASN1_D2I_Init();
@@ -167,8 +157,7 @@ long length;
        M_ASN1_D2I_Finish(a, PBKDF2PARAM_free, ASN1_F_D2I_PBKDF2PARAM);
 }
 
-void PBKDF2PARAM_free (a)
-PBKDF2PARAM *a;
+void PBKDF2PARAM_free (PBKDF2PARAM *a)
 {
        if(a==NULL) return;
        ASN1_OCTET_STRING_free(a->salt);
index bf7b8e2..516746b 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_PKCS7_DIGEST,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_PKCS7_DIGEST(a,pp)
-PKCS7_DIGEST *a;
-unsigned char **pp;
+int i2d_PKCS7_DIGEST(PKCS7_DIGEST *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -87,10 +85,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7_DIGEST *d2i_PKCS7_DIGEST(a,pp,length)
-PKCS7_DIGEST **a;
-unsigned char **pp;
-long length;
+PKCS7_DIGEST *d2i_PKCS7_DIGEST(PKCS7_DIGEST **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,PKCS7_DIGEST *,PKCS7_DIGEST_new);
 
@@ -104,7 +100,7 @@ long length;
        M_ASN1_D2I_Finish(a,PKCS7_DIGEST_free,ASN1_F_D2I_PKCS7_DIGEST);
        }
 
-PKCS7_DIGEST *PKCS7_DIGEST_new()
+PKCS7_DIGEST *PKCS7_DIGEST_new(void)
        {
        PKCS7_DIGEST *ret=NULL;
        ASN1_CTX c;
@@ -118,8 +114,7 @@ PKCS7_DIGEST *PKCS7_DIGEST_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_DIGEST_NEW);
        }
 
-void PKCS7_DIGEST_free(a)
-PKCS7_DIGEST *a;
+void PKCS7_DIGEST_free(PKCS7_DIGEST *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
index 56e27fa..f5ebbf7 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_PKCS7_ENCRYPT,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_PKCS7_ENCRYPT(a,pp)
-PKCS7_ENCRYPT *a;
-unsigned char **pp;
+int i2d_PKCS7_ENCRYPT(PKCS7_ENCRYPT *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -83,10 +81,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(a,pp,length)
-PKCS7_ENCRYPT **a;
-unsigned char **pp;
-long length;
+PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(PKCS7_ENCRYPT **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,PKCS7_ENCRYPT *,PKCS7_ENCRYPT_new);
 
@@ -98,7 +94,7 @@ long length;
        M_ASN1_D2I_Finish(a,PKCS7_ENCRYPT_free,ASN1_F_D2I_PKCS7_ENCRYPT);
        }
 
-PKCS7_ENCRYPT *PKCS7_ENCRYPT_new()
+PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void)
        {
        PKCS7_ENCRYPT *ret=NULL;
        ASN1_CTX c;
@@ -110,8 +106,7 @@ PKCS7_ENCRYPT *PKCS7_ENCRYPT_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_ENCRYPT_NEW);
        }
 
-void PKCS7_ENCRYPT_free(a)
-PKCS7_ENCRYPT *a;
+void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
index f98afb5..8914d87 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_PKCS7_ENC_CONTENT,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_PKCS7_ENC_CONTENT(a,pp)
-PKCS7_ENC_CONTENT *a;
-unsigned char **pp;
+int i2d_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -85,10 +83,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7_ENC_CONTENT *d2i_PKCS7_ENC_CONTENT(a,pp,length)
-PKCS7_ENC_CONTENT **a;
-unsigned char **pp;
-long length;
+PKCS7_ENC_CONTENT *d2i_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT **a,
+            unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,PKCS7_ENC_CONTENT *,PKCS7_ENC_CONTENT_new);
 
@@ -103,7 +99,7 @@ long length;
                ASN1_F_D2I_PKCS7_ENC_CONTENT);
        }
 
-PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new()
+PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new(void)
        {
        PKCS7_ENC_CONTENT *ret=NULL;
        ASN1_CTX c;
@@ -117,8 +113,7 @@ PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_ENC_CONTENT_NEW);
        }
 
-void PKCS7_ENC_CONTENT_free(a)
-PKCS7_ENC_CONTENT *a;
+void PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a)
        {
        if (a == NULL) return;
        ASN1_OBJECT_free(a->content_type);
index 7879a66..babb9b2 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_PKCS7_ENVELOPE,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_PKCS7_ENVELOPE(a,pp)
-PKCS7_ENVELOPE *a;
-unsigned char **pp;
+int i2d_PKCS7_ENVELOPE(PKCS7_ENVELOPE *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -85,10 +83,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7_ENVELOPE *d2i_PKCS7_ENVELOPE(a,pp,length)
-PKCS7_ENVELOPE **a;
-unsigned char **pp;
-long length;
+PKCS7_ENVELOPE *d2i_PKCS7_ENVELOPE(PKCS7_ENVELOPE **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,PKCS7_ENVELOPE *,PKCS7_ENVELOPE_new);
 
@@ -102,7 +98,7 @@ long length;
        M_ASN1_D2I_Finish(a,PKCS7_ENVELOPE_free,ASN1_F_D2I_PKCS7_ENVELOPE);
        }
 
-PKCS7_ENVELOPE *PKCS7_ENVELOPE_new()
+PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void)
        {
        PKCS7_ENVELOPE *ret=NULL;
        ASN1_CTX c;
@@ -115,8 +111,7 @@ PKCS7_ENVELOPE *PKCS7_ENVELOPE_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_ENVELOPE_NEW);
        }
 
-void PKCS7_ENVELOPE_free(a)
-PKCS7_ENVELOPE *a;
+void PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
index 9bae647..11ebfca 100644 (file)
@@ -66,9 +66,8 @@
  * ASN1err(ASN1_F_D2I_PKCS7_ISSUER_AND_SERIAL,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_PKCS7_ISSUER_AND_SERIAL(a,pp)
-PKCS7_ISSUER_AND_SERIAL *a;
-unsigned char **pp;
+int i2d_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL *a,
+            unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -83,10 +82,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7_ISSUER_AND_SERIAL *d2i_PKCS7_ISSUER_AND_SERIAL(a,pp,length)
-PKCS7_ISSUER_AND_SERIAL **a;
-unsigned char **pp;
-long length;
+PKCS7_ISSUER_AND_SERIAL *d2i_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL **a, unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,PKCS7_ISSUER_AND_SERIAL *,PKCS7_ISSUER_AND_SERIAL_new);
 
@@ -98,7 +94,7 @@ long length;
                ASN1_F_D2I_PKCS7_ISSUER_AND_SERIAL);
        }
 
-PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new()
+PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new(void)
        {
        PKCS7_ISSUER_AND_SERIAL *ret=NULL;
        ASN1_CTX c;
@@ -110,8 +106,7 @@ PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_ISSUER_AND_SERIAL_NEW);
        }
 
-void PKCS7_ISSUER_AND_SERIAL_free(a)
-PKCS7_ISSUER_AND_SERIAL *a;
+void PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a)
        {
        if (a == NULL) return;
        X509_NAME_free(a->issuer);
index 4ab6477..560f63d 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_PKCS7_NEW,ASN1_R_BAD_PKCS7_TYPE);
  */
 
-int i2d_PKCS7(a,pp)
-PKCS7 *a;
-unsigned char **pp;
+int i2d_PKCS7(PKCS7 *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -150,10 +148,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7 *d2i_PKCS7(a,pp,length)
-PKCS7 **a;
-unsigned char **pp;
-long length;
+PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,PKCS7 *,PKCS7_new);
 
@@ -236,7 +231,7 @@ long length;
        M_ASN1_D2I_Finish(a,PKCS7_free,ASN1_F_D2I_PKCS7);
        }
 
-PKCS7 *PKCS7_new()
+PKCS7 *PKCS7_new(void)
        {
        PKCS7 *ret=NULL;
        ASN1_CTX c;
@@ -251,8 +246,7 @@ PKCS7 *PKCS7_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_NEW);
        }
 
-void PKCS7_free(a)
-PKCS7 *a;
+void PKCS7_free(PKCS7 *a)
        {
        if (a == NULL) return;
 
@@ -264,8 +258,7 @@ PKCS7 *a;
        Free((char *)(char *)a);
        }
 
-void PKCS7_content_free(a)
-PKCS7 *a;
+void PKCS7_content_free(PKCS7 *a)
        {
        if(a == NULL)
            return;
index 2516d7b..f6d1217 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_PKCS7_RECIP_INFO,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_PKCS7_RECIP_INFO(a,pp)
-PKCS7_RECIP_INFO *a;
-unsigned char **pp;
+int i2d_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -87,10 +85,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7_RECIP_INFO *d2i_PKCS7_RECIP_INFO(a,pp,length)
-PKCS7_RECIP_INFO **a;
-unsigned char **pp;
-long length;
+PKCS7_RECIP_INFO *d2i_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO **a,
+            unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,PKCS7_RECIP_INFO *,PKCS7_RECIP_INFO_new);
 
@@ -104,7 +100,7 @@ long length;
        M_ASN1_D2I_Finish(a,PKCS7_RECIP_INFO_free,ASN1_F_D2I_PKCS7_RECIP_INFO);
        }
 
-PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new()
+PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new(void)
        {
        PKCS7_RECIP_INFO *ret=NULL;
        ASN1_CTX c;
@@ -119,8 +115,7 @@ PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_RECIP_INFO_NEW);
        }
 
-void PKCS7_RECIP_INFO_free(a)
-PKCS7_RECIP_INFO *a;
+void PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
index 8271c8f..c4d0eef 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_PKCS7_SIGN_ENVELOPE,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_PKCS7_SIGN_ENVELOPE(a,pp)
-PKCS7_SIGN_ENVELOPE *a;
-unsigned char **pp;
+int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -93,10 +91,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(a,pp,length)
-PKCS7_SIGN_ENVELOPE **a;
-unsigned char **pp;
-long length;
+PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a,
+            unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,PKCS7_SIGN_ENVELOPE *,PKCS7_SIGN_ENVELOPE_new);
 
@@ -116,7 +112,7 @@ long length;
                ASN1_F_D2I_PKCS7_SIGN_ENVELOPE);
        }
 
-PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new()
+PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void)
        {
        PKCS7_SIGN_ENVELOPE *ret=NULL;
        ASN1_CTX c;
@@ -133,8 +129,7 @@ PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_SIGN_ENVELOPE_NEW);
        }
 
-void PKCS7_SIGN_ENVELOPE_free(a)
-PKCS7_SIGN_ENVELOPE *a;
+void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
index f4d03f8..c7e78cd 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_PKCS7_SIGNED,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_PKCS7_SIGNED(a,pp)
-PKCS7_SIGNED *a;
-unsigned char **pp;
+int i2d_PKCS7_SIGNED(PKCS7_SIGNED *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -91,10 +89,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7_SIGNED *d2i_PKCS7_SIGNED(a,pp,length)
-PKCS7_SIGNED **a;
-unsigned char **pp;
-long length;
+PKCS7_SIGNED *d2i_PKCS7_SIGNED(PKCS7_SIGNED **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,PKCS7_SIGNED *,PKCS7_SIGNED_new);
 
@@ -111,7 +107,7 @@ long length;
        M_ASN1_D2I_Finish(a,PKCS7_SIGNED_free,ASN1_F_D2I_PKCS7_SIGNED);
        }
 
-PKCS7_SIGNED *PKCS7_SIGNED_new()
+PKCS7_SIGNED *PKCS7_SIGNED_new(void)
        {
        PKCS7_SIGNED *ret=NULL;
        ASN1_CTX c;
@@ -127,8 +123,7 @@ PKCS7_SIGNED *PKCS7_SIGNED_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_SIGNED_NEW);
        }
 
-void PKCS7_SIGNED_free(a)
-PKCS7_SIGNED *a;
+void PKCS7_SIGNED_free(PKCS7_SIGNED *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
index 2a5dcb3..3ca11d9 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_PKCS7_SIGNER_INFO,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_PKCS7_SIGNER_INFO(a,pp)
-PKCS7_SIGNER_INFO *a;
-unsigned char **pp;
+int i2d_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -93,10 +91,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-PKCS7_SIGNER_INFO *d2i_PKCS7_SIGNER_INFO(a,pp,length)
-PKCS7_SIGNER_INFO **a;
-unsigned char **pp;
-long length;
+PKCS7_SIGNER_INFO *d2i_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO **a,
+            unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,PKCS7_SIGNER_INFO *,PKCS7_SIGNER_INFO_new);
 
@@ -116,7 +112,7 @@ long length;
                ASN1_F_D2I_PKCS7_SIGNER_INFO);
        }
 
-PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new()
+PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new(void)
        {
        PKCS7_SIGNER_INFO *ret=NULL;
        ASN1_CTX c;
@@ -134,8 +130,7 @@ PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new()
        M_ASN1_New_Error(ASN1_F_PKCS7_SIGNER_INFO_NEW);
        }
 
-void PKCS7_SIGNER_INFO_free(a)
-PKCS7_SIGNER_INFO *a;
+void PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
index 3600094..455ee88 100644 (file)
@@ -65,9 +65,7 @@
  *ASN1err(ASN1_F_D2I_PKCS8_PRIV_KEY_INFO,ASN1_R_DECODE_ERROR)
  */
 
-int i2d_PKCS8_PRIV_KEY_INFO (a,pp)
-PKCS8_PRIV_KEY_INFO *a;
-unsigned char **pp;
+int i2d_PKCS8_PRIV_KEY_INFO (PKCS8_PRIV_KEY_INFO *a, unsigned char **pp)
 {
 
        M_ASN1_I2D_vars(a);
@@ -87,7 +85,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
 }
 
-PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new()
+PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new(void)
 {
        PKCS8_PRIV_KEY_INFO *ret=NULL;
        ASN1_CTX c;
@@ -101,10 +99,8 @@ PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new()
        M_ASN1_New_Error(ASN1_F_PKCS8_PRIV_KEY_INFO_NEW);
 }
 
-PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO(a,pp,length)
-PKCS8_PRIV_KEY_INFO **a;
-unsigned char **pp;
-long length;
+PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO **a,
+            unsigned char **pp, long length)
 {
        M_ASN1_D2I_vars(a,PKCS8_PRIV_KEY_INFO *,PKCS8_PRIV_KEY_INFO_new);
        M_ASN1_D2I_Init();
@@ -119,8 +115,7 @@ long length;
        M_ASN1_D2I_Finish(a, PKCS8_PRIV_KEY_INFO_free, ASN1_F_D2I_PKCS8_PRIV_KEY_INFO);
 }
 
-void PKCS8_PRIV_KEY_INFO_free (a)
-PKCS8_PRIV_KEY_INFO *a;
+void PKCS8_PRIV_KEY_INFO_free (PKCS8_PRIV_KEY_INFO *a)
 {
        if (a == NULL) return;
        ASN1_INTEGER_free (a->version);
index d2bc9ce..c9e94a2 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_X509_KEY_NEW,ERR_R_BAD_GET_ASN1_OBJECT_CALL);
  */
 
-int i2d_X509_KEY(a,pp)
-X509 *a;
-unsigned char **pp;
+int i2d_X509_KEY(X509 *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -85,10 +83,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509 *d2i_X509_KEY(a,pp,length)
-X509 **a;
-unsigned char **pp;
-long length;
+X509 *d2i_X509_KEY(X509 **a, unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,X509 *,X509_new);
 
@@ -100,7 +95,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_free,ASN1_F_D2I_X509);
        }
 
-X509 *X509_KEY_new()
+X509 *X509_KEY_new(void)
        {
        X509_KEY *ret=NULL;
 
@@ -114,8 +109,7 @@ X509 *X509_KEY_new()
        M_ASN1_New_Error(ASN1_F_X509_NEW);
        }
 
-void X509_KEY_free(a)
-X509 *a;
+void X509_KEY_free(X509 *a)
        {
        int i;
 
index eb0ab2e..e919893 100644 (file)
@@ -71,9 +71,7 @@ static void ext_print();
 #endif
 
 #ifndef NO_FP_API
-int X509_CRL_print_fp(fp,x)
-FILE *fp;
-X509_CRL *x;
+int X509_CRL_print_fp(FILE *fp, X509_CRL *x)
         {
         BIO *b;
         int ret;
@@ -90,9 +88,7 @@ X509_CRL *x;
         }
 #endif
 
-int X509_CRL_print(out, x)
-BIO *out;
-X509_CRL *x;
+int X509_CRL_print(BIO *out, X509_CRL *x)
 {
        char buf[256];
        unsigned char *s;
@@ -157,9 +153,7 @@ X509_CRL *x;
 
 }
 
-static void ext_print(out, ex)
-BIO *out;
-X509_EXTENSION *ex;
+static void ext_print(BIO *out, X509_EXTENSION *ex)
 {
        ASN1_OBJECT *obj;
        int j;
index 8a960f9..fde4a37 100644 (file)
@@ -83,10 +83,7 @@ static int print();
 
 #ifndef NO_RSA
 #ifndef NO_FP_API
-int RSA_print_fp(fp,x,off)
-FILE *fp;
-RSA *x;
-int off;
+int RSA_print_fp(FILE *fp, RSA *x, int off)
         {
         BIO *b;
         int ret;
@@ -103,10 +100,7 @@ int off;
         }
 #endif
 
-int RSA_print(bp,x,off)
-BIO *bp;
-RSA *x;
-int off;
+int RSA_print(BIO *bp, RSA *x, int off)
        {
        char str[128];
        const char *s;
@@ -155,10 +149,7 @@ err:
 
 #ifndef NO_DSA
 #ifndef NO_FP_API
-int DSA_print_fp(fp,x,off)
-FILE *fp;
-DSA *x;
-int off;
+int DSA_print_fp(FILE *fp, DSA *x, int off)
        {
        BIO *b;
        int ret;
@@ -175,10 +166,7 @@ int off;
        }
 #endif
 
-int DSA_print(bp,x,off)
-BIO *bp;
-DSA *x;
-int off;
+int DSA_print(BIO *bp, DSA *x, int off)
        {
        char str[128];
        unsigned char *m=NULL;
@@ -230,12 +218,8 @@ err:
        }
 #endif /* !NO_DSA */
 
-static int print(bp,number,num,buf,off)
-BIO *bp;
-const char *number;
-BIGNUM *num;
-unsigned char *buf;
-int off;
+static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf,
+            int off)
        {
        int n,i;
        char str[128];
@@ -286,9 +270,7 @@ int off;
 
 #ifndef NO_DH
 #ifndef NO_FP_API
-int DHparams_print_fp(fp,x)
-FILE *fp;
-DH *x;
+int DHparams_print_fp(FILE *fp, DH *x)
         {
         BIO *b;
         int ret;
@@ -305,9 +287,7 @@ DH *x;
         }
 #endif
 
-int DHparams_print(bp,x)
-BIO *bp;
-DH *x;
+int DHparams_print(BIO *bp, DH *x)
        {
        unsigned char *m=NULL;
        int reason=ERR_R_BUF_LIB,i,ret=0;
@@ -343,9 +323,7 @@ err:
 
 #ifndef NO_DSA
 #ifndef NO_FP_API
-int DSAparams_print_fp(fp,x)
-FILE *fp;
-DSA *x;
+int DSAparams_print_fp(FILE *fp, DSA *x)
         {
         BIO *b;
         int ret;
@@ -362,9 +340,7 @@ DSA *x;
         }
 #endif
 
-int DSAparams_print(bp,x)
-BIO *bp;
-DSA *x;
+int DSAparams_print(BIO *bp, DSA *x)
        {
        unsigned char *m=NULL;
        int reason=ERR_R_BUF_LIB,i,ret=0;
index bc05ff6..1079fe6 100644 (file)
@@ -64,9 +64,7 @@
 #include "x509.h"
 
 #ifndef NO_FP_API
-int X509_REQ_print_fp(fp,x)
-FILE *fp;
-X509_REQ *x;
+int X509_REQ_print_fp(FILE *fp, X509_REQ *x)
         {
         BIO *b;
         int ret;
@@ -83,9 +81,7 @@ X509_REQ *x;
         }
 #endif
 
-int X509_REQ_print(bp,x)
-BIO *bp;
-X509_REQ *x;
+int X509_REQ_print(BIO *bp, X509_REQ *x)
        {
        unsigned long l;
        int i,n;
index 1ab2cae..e804635 100644 (file)
@@ -71,9 +71,7 @@
 #include "x509v3.h"
 
 #ifndef NO_FP_API
-int X509_print_fp(fp,x)
-FILE *fp;
-X509 *x;
+int X509_print_fp(FILE *fp, X509 *x)
         {
         BIO *b;
         int ret;
@@ -90,9 +88,7 @@ X509 *x;
         }
 #endif
 
-int X509_print(bp,x)
-BIO *bp;
-X509 *x;
+int X509_print(BIO *bp, X509 *x)
        {
        long l;
        int ret=0,i,j,n;
@@ -233,9 +229,7 @@ err:
        return(ret);
        }
 
-int ASN1_STRING_print(bp,v)
-BIO *bp;
-ASN1_STRING *v;
+int ASN1_STRING_print(BIO *bp, ASN1_STRING *v)
        {
        int i,n;
        char buf[80],*p;;
@@ -264,9 +258,7 @@ ASN1_STRING *v;
        return(1);
        }
 
-int ASN1_TIME_print(bp, tm)
-BIO *bp;
-ASN1_TIME *tm;
+int ASN1_TIME_print(BIO *bp, ASN1_TIME *tm)
 {
        if(tm->type == V_ASN1_UTCTIME) return ASN1_UTCTIME_print(bp, tm);
        if(tm->type == V_ASN1_GENERALIZEDTIME)
@@ -281,9 +273,7 @@ static const char *mon[12]=
     "Jul","Aug","Sep","Oct","Nov","Dec"
     };
 
-int ASN1_GENERALIZEDTIME_print(bp,tm)
-BIO *bp;
-ASN1_GENERALIZEDTIME *tm;
+int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
        {
        char *v;
        int gmt=0;
@@ -317,9 +307,7 @@ err:
        return(0);
        }
 
-int ASN1_UTCTIME_print(bp,tm)
-BIO *bp;
-ASN1_UTCTIME *tm;
+int ASN1_UTCTIME_print(BIO *bp, ASN1_UTCTIME *tm)
        {
        char *v;
        int gmt=0;
@@ -354,10 +342,7 @@ err:
        return(0);
        }
 
-int X509_NAME_print(bp,name,obase)
-BIO *bp;
-X509_NAME *name;
-int obase;
+int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
        {
        char *s,*c;
        int ret=0,l,ll,i,first=1;
index 01aa0cb..70b3779 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_D2I_X509_ALGOR,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_X509_ALGOR(a,pp)
-X509_ALGOR *a;
-unsigned char **pp;
+int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -84,10 +82,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_ALGOR *d2i_X509_ALGOR(a,pp,length)
-X509_ALGOR **a;
-unsigned char **pp;
-long length;
+X509_ALGOR *d2i_X509_ALGOR(X509_ALGOR **a, unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,X509_ALGOR *,X509_ALGOR_new);
 
@@ -104,7 +99,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_ALGOR_free,ASN1_F_D2I_X509_ALGOR);
        }
 
-X509_ALGOR *X509_ALGOR_new()
+X509_ALGOR *X509_ALGOR_new(void)
        {
        X509_ALGOR *ret=NULL;
        ASN1_CTX c;
@@ -116,8 +111,7 @@ X509_ALGOR *X509_ALGOR_new()
        M_ASN1_New_Error(ASN1_F_X509_ALGOR_NEW);
        }
 
-void X509_ALGOR_free(a)
-X509_ALGOR *a;
+void X509_ALGOR_free(X509_ALGOR *a)
        {
        if (a == NULL) return;
        ASN1_OBJECT_free(a->algorithm);
index 68b2648..ab8777a 100644 (file)
@@ -68,9 +68,7 @@
  */
 
 /* sequence */
-int i2d_X509_ATTRIBUTE(a,pp)
-X509_ATTRIBUTE *a;
-unsigned char **pp;
+int i2d_X509_ATTRIBUTE(X509_ATTRIBUTE *a, unsigned char **pp)
        {
        int k=0;
        int r=0,ret=0;
@@ -100,10 +98,8 @@ unsigned char **pp;
                }
        }
 
-X509_ATTRIBUTE *d2i_X509_ATTRIBUTE(a,pp,length)
-X509_ATTRIBUTE **a;
-unsigned char **pp;
-long length;
+X509_ATTRIBUTE *d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,X509_ATTRIBUTE *,X509_ATTRIBUTE_new);
 
@@ -126,10 +122,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_ATTRIBUTE_free,ASN1_F_D2I_X509_ATTRIBUTE);
        }
 
-X509_ATTRIBUTE *X509_ATTRIBUTE_create(nid,atrtype,value)
-int nid;
-int atrtype;
-char *value;
+X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, char *value)
        {
        X509_ATTRIBUTE *ret=NULL;
        ASN1_TYPE *val=NULL;
@@ -150,7 +143,7 @@ err:
        return(NULL);
        }
 
-X509_ATTRIBUTE *X509_ATTRIBUTE_new()
+X509_ATTRIBUTE *X509_ATTRIBUTE_new(void)
        {
        X509_ATTRIBUTE *ret=NULL;
        ASN1_CTX c;
@@ -163,8 +156,7 @@ X509_ATTRIBUTE *X509_ATTRIBUTE_new()
        M_ASN1_New_Error(ASN1_F_X509_ATTRIBUTE_NEW);
        }
        
-void X509_ATTRIBUTE_free(a)
-X509_ATTRIBUTE *a;
+void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a)
        {
        if (a == NULL) return;
        ASN1_OBJECT_free(a->object);
index 88099ea..4193933 100644 (file)
@@ -65,9 +65,7 @@
  * ASN1err(ASN1_F_X509_CINF_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_X509_CINF(a,pp)
-X509_CINF *a;
-unsigned char **pp;
+int i2d_X509_CINF(X509_CINF *a, unsigned char **pp)
        {
        int v1=0,v2=0;
        M_ASN1_I2D_vars(a);
@@ -99,10 +97,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_CINF *d2i_X509_CINF(a,pp,length)
-X509_CINF **a;
-unsigned char **pp;
-long length;
+X509_CINF *d2i_X509_CINF(X509_CINF **a, unsigned char **pp, long length)
        {
        int ver=0;
        M_ASN1_D2I_vars(a,X509_CINF *,X509_CINF_new);
@@ -166,7 +161,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_CINF_free,ASN1_F_D2I_X509_CINF);
        }
 
-X509_CINF *X509_CINF_new()
+X509_CINF *X509_CINF_new(void)
        {
        X509_CINF *ret=NULL;
        ASN1_CTX c;
@@ -186,8 +181,7 @@ X509_CINF *X509_CINF_new()
        M_ASN1_New_Error(ASN1_F_X509_CINF_NEW);
        }
 
-void X509_CINF_free(a)
-X509_CINF *a;
+void X509_CINF_free(X509_CINF *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
index 1dd651b..e8f8ebd 100644 (file)
@@ -78,9 +78,7 @@ static int X509_REVOKED_cmp();
 static int X509_REVOKED_seq_cmp();
 #endif
 
-int i2d_X509_REVOKED(a,pp)
-X509_REVOKED *a;
-unsigned char **pp;
+int i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -97,10 +95,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_REVOKED *d2i_X509_REVOKED(a,pp,length)
-X509_REVOKED **a;
-unsigned char **pp;
-long length;
+X509_REVOKED *d2i_X509_REVOKED(X509_REVOKED **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,X509_REVOKED *,X509_REVOKED_new);
 
@@ -113,9 +109,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_REVOKED_free,ASN1_F_D2I_X509_REVOKED);
        }
 
-int i2d_X509_CRL_INFO(a,pp)
-X509_CRL_INFO *a;
-unsigned char **pp;
+int i2d_X509_CRL_INFO(X509_CRL_INFO *a, unsigned char **pp)
        {
        int v1=0;
        long l=0;
@@ -155,10 +149,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_CRL_INFO *d2i_X509_CRL_INFO(a,pp,length)
-X509_CRL_INFO **a;
-unsigned char **pp;
-long length;
+X509_CRL_INFO *d2i_X509_CRL_INFO(X509_CRL_INFO **a, unsigned char **pp,
+            long length)
        {
        int i,ver=0;
        M_ASN1_D2I_vars(a,X509_CRL_INFO *,X509_CRL_INFO_new);
@@ -220,9 +212,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_CRL_INFO_free,ASN1_F_D2I_X509_CRL_INFO);
        }
 
-int i2d_X509_CRL(a,pp)
-X509_CRL *a;
-unsigned char **pp;
+int i2d_X509_CRL(X509_CRL *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -239,10 +229,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_CRL *d2i_X509_CRL(a,pp,length)
-X509_CRL **a;
-unsigned char **pp;
-long length;
+X509_CRL *d2i_X509_CRL(X509_CRL **a, unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,X509_CRL *,X509_CRL_new);
 
@@ -256,7 +243,7 @@ long length;
        }
 
 
-X509_REVOKED *X509_REVOKED_new()
+X509_REVOKED *X509_REVOKED_new(void)
        {
        X509_REVOKED *ret=NULL;
        ASN1_CTX c;
@@ -269,7 +256,7 @@ X509_REVOKED *X509_REVOKED_new()
        M_ASN1_New_Error(ASN1_F_X509_REVOKED_NEW);
        }
 
-X509_CRL_INFO *X509_CRL_INFO_new()
+X509_CRL_INFO *X509_CRL_INFO_new(void)
        {
        X509_CRL_INFO *ret=NULL;
        ASN1_CTX c;
@@ -287,7 +274,7 @@ X509_CRL_INFO *X509_CRL_INFO_new()
        M_ASN1_New_Error(ASN1_F_X509_CRL_INFO_NEW);
        }
 
-X509_CRL *X509_CRL_new()
+X509_CRL *X509_CRL_new(void)
        {
        X509_CRL *ret=NULL;
        ASN1_CTX c;
@@ -301,8 +288,7 @@ X509_CRL *X509_CRL_new()
        M_ASN1_New_Error(ASN1_F_X509_CRL_NEW);
        }
 
-void X509_REVOKED_free(a)
-X509_REVOKED *a;
+void X509_REVOKED_free(X509_REVOKED *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->serialNumber);
@@ -311,8 +297,7 @@ X509_REVOKED *a;
        Free((char *)a);
        }
 
-void X509_CRL_INFO_free(a)
-X509_CRL_INFO *a;
+void X509_CRL_INFO_free(X509_CRL_INFO *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
@@ -326,8 +311,7 @@ X509_CRL_INFO *a;
        Free((char *)a);
        }
 
-void X509_CRL_free(a)
-X509_CRL *a;
+void X509_CRL_free(X509_CRL *a)
        {
        int i;
 
@@ -352,16 +336,14 @@ X509_CRL *a;
        Free((char *)a);
        }
 
-static int X509_REVOKED_cmp(a,b)
-X509_REVOKED **a,**b;
+static int X509_REVOKED_cmp(X509_REVOKED **a, X509_REVOKED **b)
        {
        return(ASN1_STRING_cmp(
                (ASN1_STRING *)(*a)->serialNumber,
                (ASN1_STRING *)(*b)->serialNumber));
        }
 
-static int X509_REVOKED_seq_cmp(a,b)
-X509_REVOKED **a,**b;
+static int X509_REVOKED_seq_cmp(X509_REVOKED **a, X509_REVOKED **b)
        {
        return((*a)->sequence-(*b)->sequence);
        }
index f5e3ece..15c46e3 100644 (file)
@@ -66,9 +66,7 @@
  * ASN1err(ASN1_F_X509_EXTENSION_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_X509_EXTENSION(a,pp)
-X509_EXTENSION *a;
-unsigned char **pp;
+int i2d_X509_EXTENSION(X509_EXTENSION *a, unsigned char **pp)
        {
        int k=0;
        int r=0,ret=0;
@@ -96,10 +94,8 @@ unsigned char **pp;
                }
        }
 
-X509_EXTENSION *d2i_X509_EXTENSION(a,pp,length)
-X509_EXTENSION **a;
-unsigned char **pp;
-long length;
+X509_EXTENSION *d2i_X509_EXTENSION(X509_EXTENSION **a, unsigned char **pp,
+            long length)
        {
        int i;
        M_ASN1_D2I_vars(a,X509_EXTENSION *,X509_EXTENSION_new);
@@ -127,7 +123,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_EXTENSION_free,ASN1_F_D2I_X509_EXTENSION);
        }
 
-X509_EXTENSION *X509_EXTENSION_new()
+X509_EXTENSION *X509_EXTENSION_new(void)
        {
        X509_EXTENSION *ret=NULL;
        ASN1_CTX c;
@@ -144,8 +140,7 @@ X509_EXTENSION *X509_EXTENSION_new()
        M_ASN1_New_Error(ASN1_F_X509_EXTENSION_NEW);
        }
        
-void X509_EXTENSION_free(a)
-X509_EXTENSION *a;
+void X509_EXTENSION_free(X509_EXTENSION *a)
        {
        if (a == NULL) return;
        if ((a->argp != NULL) && (a->ex_free != NULL))
index b55f0ce..03bc38c 100644 (file)
@@ -62,7 +62,7 @@
 #include "asn1_mac.h"
 #include "x509.h"
 
-X509_INFO *X509_INFO_new()
+X509_INFO *X509_INFO_new(void)
        {
        X509_INFO *ret=NULL;
 
@@ -84,8 +84,7 @@ X509_INFO *X509_INFO_new()
        return(ret);
        }
 
-void X509_INFO_free(x)
-X509_INFO *x;
+void X509_INFO_free(X509_INFO *x)
        {
        int i;
 
index 3af14c8..939b169 100644 (file)
@@ -74,9 +74,7 @@ static int i2d_X509_NAME_entries(X509_NAME *a);
 static int i2d_X509_NAME_entries();
 #endif
 
-int i2d_X509_NAME_ENTRY(a,pp)
-X509_NAME_ENTRY *a;
-unsigned char **pp;
+int i2d_X509_NAME_ENTRY(X509_NAME_ENTRY *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -91,10 +89,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_NAME_ENTRY *d2i_X509_NAME_ENTRY(a,pp,length)
-X509_NAME_ENTRY **a;
-unsigned char **pp;
-long length;
+X509_NAME_ENTRY *d2i_X509_NAME_ENTRY(X509_NAME_ENTRY **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,X509_NAME_ENTRY *,X509_NAME_ENTRY_new);
 
@@ -106,9 +102,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_NAME_ENTRY_free,ASN1_F_D2I_X509_NAME_ENTRY);
        }
 
-int i2d_X509_NAME(a,pp)
-X509_NAME *a;
-unsigned char **pp;
+int i2d_X509_NAME(X509_NAME *a, unsigned char **pp)
        {
        int ret;
 
@@ -128,8 +122,7 @@ unsigned char **pp;
        return(ret);
        }
 
-static int i2d_X509_NAME_entries(a)
-X509_NAME *a;
+static int i2d_X509_NAME_entries(X509_NAME *a)
        {
        X509_NAME_ENTRY *ne,*fe=NULL;
        STACK *sk;
@@ -190,10 +183,7 @@ err:
        return(-1);
        }
 
-X509_NAME *d2i_X509_NAME(a,pp,length)
-X509_NAME **a;
-unsigned char **pp;
-long length;
+X509_NAME *d2i_X509_NAME(X509_NAME **a, unsigned char **pp, long length)
        {
        int set=0,i;
        int idx=0;
@@ -232,7 +222,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_NAME_free,ASN1_F_D2I_X509_NAME);
        }
 
-X509_NAME *X509_NAME_new()
+X509_NAME *X509_NAME_new(void)
        {
        X509_NAME *ret=NULL;
        ASN1_CTX c;
@@ -246,7 +236,7 @@ X509_NAME *X509_NAME_new()
        M_ASN1_New_Error(ASN1_F_X509_NAME_NEW);
        }
 
-X509_NAME_ENTRY *X509_NAME_ENTRY_new()
+X509_NAME_ENTRY *X509_NAME_ENTRY_new(void)
        {
        X509_NAME_ENTRY *ret=NULL;
        ASN1_CTX c;
@@ -260,8 +250,7 @@ X509_NAME_ENTRY *X509_NAME_ENTRY_new()
        M_ASN1_New_Error(ASN1_F_X509_NAME_ENTRY_NEW);
        }
 
-void X509_NAME_free(a)
-X509_NAME *a;
+void X509_NAME_free(X509_NAME *a)
        {
        if(a == NULL)
            return;
@@ -271,8 +260,7 @@ X509_NAME *a;
        Free((char *)a);
        }
 
-void X509_NAME_ENTRY_free(a)
-X509_NAME_ENTRY *a;
+void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a)
        {
        if (a == NULL) return;
        ASN1_OBJECT_free(a->object);
@@ -280,9 +268,7 @@ X509_NAME_ENTRY *a;
        Free((char *)a);
        }
 
-int X509_NAME_set(xn,name)
-X509_NAME **xn;
-X509_NAME *name;
+int X509_NAME_set(X509_NAME **xn, X509_NAME *name)
        {
        X509_NAME *in;
 
index 3a359cc..2e677f0 100644 (file)
 /* ASN1err(ASN1_F_X509_PKEY_NEW,ASN1_R_IV_TOO_LARGE); */
 
 /* need to implement */
-int i2d_X509_PKEY(a,pp)
-X509_PKEY *a;
-unsigned char **pp;
+int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp)
        {
        return(0);
        }
 
-X509_PKEY *d2i_X509_PKEY(a,pp,length)
-X509_PKEY **a;
-unsigned char **pp;
-long length;
+X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, unsigned char **pp, long length)
        {
        int i;
        M_ASN1_D2I_vars(a,X509_PKEY *,X509_PKEY_new);
@@ -111,7 +106,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_PKEY_free,ASN1_F_D2I_X509_PKEY);
        }
 
-X509_PKEY *X509_PKEY_new()
+X509_PKEY *X509_PKEY_new(void)
        {
        X509_PKEY *ret=NULL;
        ASN1_CTX c;
@@ -131,8 +126,7 @@ X509_PKEY *X509_PKEY_new()
        M_ASN1_New_Error(ASN1_F_X509_PKEY_NEW);
        }
 
-void X509_PKEY_free(x)
-X509_PKEY *x;
+void X509_PKEY_free(X509_PKEY *x)
        {
        int i;
 
index 2177ebd..9711f98 100644 (file)
@@ -65,9 +65,7 @@
  * ASN1err(ASN1_F_X509_PUBKEY_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_X509_PUBKEY(a,pp)
-X509_PUBKEY *a;
-unsigned char **pp;
+int i2d_X509_PUBKEY(X509_PUBKEY *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -82,10 +80,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_PUBKEY *d2i_X509_PUBKEY(a,pp,length)
-X509_PUBKEY **a;
-unsigned char **pp;
-long length;
+X509_PUBKEY *d2i_X509_PUBKEY(X509_PUBKEY **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,X509_PUBKEY *,X509_PUBKEY_new);
 
@@ -101,7 +97,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_PUBKEY_free,ASN1_F_D2I_X509_PUBKEY);
        }
 
-X509_PUBKEY *X509_PUBKEY_new()
+X509_PUBKEY *X509_PUBKEY_new(void)
        {
        X509_PUBKEY *ret=NULL;
        ASN1_CTX c;
@@ -114,8 +110,7 @@ X509_PUBKEY *X509_PUBKEY_new()
        M_ASN1_New_Error(ASN1_F_X509_PUBKEY_NEW);
        }
 
-void X509_PUBKEY_free(a)
-X509_PUBKEY *a;
+void X509_PUBKEY_free(X509_PUBKEY *a)
        {
        if (a == NULL) return;
        X509_ALGOR_free(a->algor);
@@ -124,9 +119,7 @@ X509_PUBKEY *a;
        Free((char *)a);
        }
 
-int X509_PUBKEY_set(x,pkey)
-X509_PUBKEY **x;
-EVP_PKEY *pkey;
+int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
        {
        int ok=0;
        X509_PUBKEY *pk;
@@ -209,8 +202,7 @@ err:
        return(ok);
        }
 
-EVP_PKEY *X509_PUBKEY_get(key)
-X509_PUBKEY *key;
+EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
        {
        EVP_PKEY *ret=NULL;
        long j;
index 949632c..4bb604e 100644 (file)
@@ -68,9 +68,7 @@
  * ASN1err(ASN1_F_X509_REQ_INFO_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_X509_REQ_INFO(a,pp)
-X509_REQ_INFO *a;
-unsigned char **pp;
+int i2d_X509_REQ_INFO(X509_REQ_INFO *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -117,10 +115,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_REQ_INFO *d2i_X509_REQ_INFO(a,pp,length)
-X509_REQ_INFO **a;
-unsigned char **pp;
-long length;
+X509_REQ_INFO *d2i_X509_REQ_INFO(X509_REQ_INFO **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,X509_REQ_INFO *,X509_REQ_INFO_new);
 
@@ -148,7 +144,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_REQ_INFO_free,ASN1_F_D2I_X509_REQ_INFO);
        }
 
-X509_REQ_INFO *X509_REQ_INFO_new()
+X509_REQ_INFO *X509_REQ_INFO_new(void)
        {
        X509_REQ_INFO *ret=NULL;
        ASN1_CTX c;
@@ -163,8 +159,7 @@ X509_REQ_INFO *X509_REQ_INFO_new()
        M_ASN1_New_Error(ASN1_F_X509_REQ_INFO_NEW);
        }
        
-void X509_REQ_INFO_free(a)
-X509_REQ_INFO *a;
+void X509_REQ_INFO_free(X509_REQ_INFO *a)
        {
        if (a == NULL) return;
        ASN1_INTEGER_free(a->version);
@@ -174,9 +169,7 @@ X509_REQ_INFO *a;
        Free((char *)a);
        }
 
-int i2d_X509_REQ(a,pp)
-X509_REQ *a;
-unsigned char **pp;
+int i2d_X509_REQ(X509_REQ *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
        M_ASN1_I2D_len(a->req_info,     i2d_X509_REQ_INFO);
@@ -192,10 +185,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_REQ *d2i_X509_REQ(a,pp,length)
-X509_REQ **a;
-unsigned char **pp;
-long length;
+X509_REQ *d2i_X509_REQ(X509_REQ **a, unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,X509_REQ *,X509_REQ_new);
 
@@ -207,7 +197,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_REQ_free,ASN1_F_D2I_X509_REQ);
        }
 
-X509_REQ *X509_REQ_new()
+X509_REQ *X509_REQ_new(void)
        {
        X509_REQ *ret=NULL;
        ASN1_CTX c;
@@ -221,8 +211,7 @@ X509_REQ *X509_REQ_new()
        M_ASN1_New_Error(ASN1_F_X509_REQ_NEW);
        }
 
-void X509_REQ_free(a)
-X509_REQ *a;
+void X509_REQ_free(X509_REQ *a)
        {
        int i;
 
index 245a76b..b0675b7 100644 (file)
@@ -65,9 +65,7 @@
  * ASN1err(ASN1_F_X509_SIG_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_X509_SIG(a,pp)
-X509_SIG *a;
-unsigned char **pp;
+int i2d_X509_SIG(X509_SIG *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -82,10 +80,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_SIG *d2i_X509_SIG(a,pp,length)
-X509_SIG **a;
-unsigned char **pp;
-long length;
+X509_SIG *d2i_X509_SIG(X509_SIG **a, unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,X509_SIG *,X509_SIG_new);
 
@@ -96,7 +91,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_SIG_free,ASN1_F_D2I_X509_SIG);
        }
 
-X509_SIG *X509_SIG_new()
+X509_SIG *X509_SIG_new(void)
        {
        X509_SIG *ret=NULL;
        ASN1_CTX c;
@@ -108,8 +103,7 @@ X509_SIG *X509_SIG_new()
        M_ASN1_New_Error(ASN1_F_X509_SIG_NEW);
        }
 
-void X509_SIG_free(a)
-X509_SIG *a;
+void X509_SIG_free(X509_SIG *a)
        {
        if (a == NULL) return;
        X509_ALGOR_free(a->algor);
index 5600d30..8cb1aae 100644 (file)
@@ -72,9 +72,7 @@
  * ASN1err(ASN1_F_NETSCAPE_SPKI_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
-int i2d_NETSCAPE_SPKAC(a,pp)
-NETSCAPE_SPKAC *a;
-unsigned char **pp;
+int i2d_NETSCAPE_SPKAC(NETSCAPE_SPKAC *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -89,10 +87,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-NETSCAPE_SPKAC *d2i_NETSCAPE_SPKAC(a,pp,length)
-NETSCAPE_SPKAC **a;
-unsigned char **pp;
-long length;
+NETSCAPE_SPKAC *d2i_NETSCAPE_SPKAC(NETSCAPE_SPKAC **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,NETSCAPE_SPKAC *,NETSCAPE_SPKAC_new);
 
@@ -103,7 +99,7 @@ long length;
        M_ASN1_D2I_Finish(a,NETSCAPE_SPKAC_free,ASN1_F_D2I_NETSCAPE_SPKAC);
        }
 
-NETSCAPE_SPKAC *NETSCAPE_SPKAC_new()
+NETSCAPE_SPKAC *NETSCAPE_SPKAC_new(void)
        {
        NETSCAPE_SPKAC *ret=NULL;
        ASN1_CTX c;
@@ -115,8 +111,7 @@ NETSCAPE_SPKAC *NETSCAPE_SPKAC_new()
        M_ASN1_New_Error(ASN1_F_NETSCAPE_SPKAC_NEW);
        }
 
-void NETSCAPE_SPKAC_free(a)
-NETSCAPE_SPKAC *a;
+void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a)
        {
        if (a == NULL) return;
        X509_PUBKEY_free(a->pubkey);
@@ -124,9 +119,7 @@ NETSCAPE_SPKAC *a;
        Free((char *)a);
        }
 
-int i2d_NETSCAPE_SPKI(a,pp)
-NETSCAPE_SPKI *a;
-unsigned char **pp;
+int i2d_NETSCAPE_SPKI(NETSCAPE_SPKI *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -143,10 +136,8 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-NETSCAPE_SPKI *d2i_NETSCAPE_SPKI(a,pp,length)
-NETSCAPE_SPKI **a;
-unsigned char **pp;
-long length;
+NETSCAPE_SPKI *d2i_NETSCAPE_SPKI(NETSCAPE_SPKI **a, unsigned char **pp,
+            long length)
        {
        M_ASN1_D2I_vars(a,NETSCAPE_SPKI *,NETSCAPE_SPKI_new);
 
@@ -158,7 +149,7 @@ long length;
        M_ASN1_D2I_Finish(a,NETSCAPE_SPKI_free,ASN1_F_D2I_NETSCAPE_SPKI);
        }
 
-NETSCAPE_SPKI *NETSCAPE_SPKI_new()
+NETSCAPE_SPKI *NETSCAPE_SPKI_new(void)
        {
        NETSCAPE_SPKI *ret=NULL;
        ASN1_CTX c;
@@ -171,8 +162,7 @@ NETSCAPE_SPKI *NETSCAPE_SPKI_new()
        M_ASN1_New_Error(ASN1_F_NETSCAPE_SPKI_NEW);
        }
 
-void NETSCAPE_SPKI_free(a)
-NETSCAPE_SPKI *a;
+void NETSCAPE_SPKI_free(NETSCAPE_SPKI *a)
        {
        if (a == NULL) return;
        NETSCAPE_SPKAC_free(a->spkac);
index f6534a6..9ffa867 100644 (file)
@@ -65,9 +65,7 @@
  * ASN1err(ASN1_F_D2I_X509_VAL,ERR_R_MALLOC_FAILURE);
  */
 
-int i2d_X509_VAL(a,pp)
-X509_VAL *a;
-unsigned char **pp;
+int i2d_X509_VAL(X509_VAL *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -82,10 +80,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509_VAL *d2i_X509_VAL(a,pp,length)
-X509_VAL **a;
-unsigned char **pp;
-long length;
+X509_VAL *d2i_X509_VAL(X509_VAL **a, unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,X509_VAL *,X509_VAL_new);
 
@@ -96,7 +91,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_VAL_free,ASN1_F_D2I_X509_VAL);
        }
 
-X509_VAL *X509_VAL_new()
+X509_VAL *X509_VAL_new(void)
        {
        X509_VAL *ret=NULL;
        ASN1_CTX c;
@@ -108,8 +103,7 @@ X509_VAL *X509_VAL_new()
        M_ASN1_New_Error(ASN1_F_X509_VAL_NEW);
        }
 
-void X509_VAL_free(a)
-X509_VAL *a;
+void X509_VAL_free(X509_VAL *a)
        {
        if (a == NULL) return;
        ASN1_TIME_free(a->notBefore);
index 8e7d214..f1459a7 100644 (file)
@@ -72,14 +72,12 @@ static ASN1_METHOD meth={
        (char *(*)())X509_new,
        (void (*)()) X509_free};
 
-ASN1_METHOD *X509_asn1_meth()
+ASN1_METHOD *X509_asn1_meth(void)
        {
        return(&meth);
        }
 
-int i2d_X509(a,pp)
-X509 *a;
-unsigned char **pp;
+int i2d_X509(X509 *a, unsigned char **pp)
        {
        M_ASN1_I2D_vars(a);
 
@@ -96,10 +94,7 @@ unsigned char **pp;
        M_ASN1_I2D_finish();
        }
 
-X509 *d2i_X509(a,pp,length)
-X509 **a;
-unsigned char **pp;
-long length;
+X509 *d2i_X509(X509 **a, unsigned char **pp, long length)
        {
        M_ASN1_D2I_vars(a,X509 *,X509_new);
 
@@ -114,7 +109,7 @@ long length;
        M_ASN1_D2I_Finish(a,X509_free,ASN1_F_D2I_X509);
        }
 
-X509 *X509_new()
+X509 *X509_new(void)
        {
        X509 *ret=NULL;
        ASN1_CTX c;
@@ -130,8 +125,7 @@ X509 *X509_new()
        M_ASN1_New_Error(ASN1_F_X509_NEW);
        }
 
-void X509_free(a)
-X509 *a;
+void X509_free(X509 *a)
        {
        int i;
 
index e0fa9ad..90f1ffe 100644 (file)
 #include "blowfish.h"
 #include "bf_locl.h"
 
-void BF_cbc_encrypt(in, out, length, ks, iv, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-BF_KEY *ks;
-unsigned char *iv;
-int encrypt;
+void BF_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
+            BF_KEY *ks, unsigned char *iv, int encrypt)
        {
        register BF_LONG tin0,tin1;
        register BF_LONG tout0,tout1,xor0,xor1;
index f9c66e7..308b965 100644 (file)
  * 64bit block we have used is contained in *num;
  */
 
-void BF_cfb64_encrypt(in, out, length, schedule, ivec, num, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-BF_KEY *schedule;
-unsigned char *ivec;
-int *num;
-int encrypt;
+void BF_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
+            BF_KEY *schedule, unsigned char *ivec, int *num, int encrypt)
        {
        register BF_LONG v0,v1,t;
        register int n= *num;
index efceae6..7abe209 100644 (file)
@@ -67,7 +67,7 @@
 
 const char *BF_version="BlowFish" OPENSSL_VERSION_PTEXT;
 
-const char *BF_options()
+const char *BF_options(void)
        {
 #ifdef BF_PTR
        return("blowfish(ptr)");
@@ -78,11 +78,8 @@ const char *BF_options()
 #endif
        }
 
-void BF_ecb_encrypt(in, out, ks, encrypt)
-unsigned char *in;
-unsigned char *out;
-BF_KEY *ks;
-int encrypt;
+void BF_ecb_encrypt(unsigned char *in, unsigned char *out, BF_KEY *ks,
+            int encrypt)
        {
        BF_LONG l,d[2];
 
index 66a8604..9ae5242 100644 (file)
  */
 
 #if (BF_ROUNDS != 16) && (BF_ROUNDS != 20)
-If you set BF_ROUNDS to some value other than 16 or 20, you will have
+#error If you set BF_ROUNDS to some value other than 16 or 20, you will have \
 to modify the code.
 #endif
 
-void BF_encrypt(data,key)
-BF_LONG *data;
-BF_KEY *key;
+void BF_encrypt(BF_LONG *data, BF_KEY *key)
        {
        register BF_LONG l,r,*p,*s;
 
@@ -111,9 +109,7 @@ BF_KEY *key;
 
 #ifndef BF_DEFAULT_OPTIONS
 
-void BF_decrypt(data,key)
-BF_LONG *data;
-BF_KEY *key;
+void BF_decrypt(BF_LONG *data, BF_KEY *key)
        {
        register BF_LONG l,r,*p,*s;
 
@@ -151,13 +147,8 @@ BF_KEY *key;
        data[0]=r&0xffffffffL;
        }
 
-void BF_cbc_encrypt(in, out, length, ks, iv, encrypt)
-unsigned char *in;
-unsigned char *out;
-long length;
-BF_KEY *ks;
-unsigned char *iv;
-int encrypt;
+void BF_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
+            BF_KEY *ks, unsigned char *iv, int encrypt)
        {
        register BF_LONG tin0,tin1;
        register BF_LONG tout0,tout1,xor0,xor1;
index 5d844ac..381f6a2 100644 (file)
  * used.  The extra state information to record how much of the
  * 64bit block we have used is contained in *num;
  */
-void BF_ofb64_encrypt(in, out, length, schedule, ivec, num)
-unsigned char *in;
-unsigned char *out;
-long length;
-BF_KEY *schedule;
-unsigned char *ivec;
-int *num;
+void BF_ofb64_encrypt(unsigned char *in, unsigned char *out, long length,
+            BF_KEY *schedule, unsigned char *ivec, int *num)
        {
        register BF_LONG v0,v1,t;
        register int n= *num;
index 735d16b..e818b76 100644 (file)
@@ -162,8 +162,7 @@ SIGRETTYPE sig_done(int sig);
 SIGRETTYPE sig_done();
 #endif
 
-SIGRETTYPE sig_done(sig)
-int sig;
+SIGRETTYPE sig_done(int sig)
        {
        signal(SIGALRM,sig_done);
        run=0;
@@ -176,8 +175,7 @@ int sig;
 #define START  0
 #define STOP   1
 
-double Time_F(s)
-int s;
+double Time_F(int s)
        {
        double ret;
 #ifdef TIMES
@@ -238,9 +236,7 @@ int s;
        fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \
                tm[index]*8,1.0e6/tm[index]);
 
-int main(argc,argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
        {
        long count;
        static unsigned char buf[BUFSIZE];
index 86574c0..f6c4553 100644 (file)
 #include "bf_locl.h"
 #include "bf_pi.h"
 
-void BF_set_key(key,len,data)
-BF_KEY *key;
-int len;
-unsigned char *data;
+void BF_set_key(BF_KEY *key, int len, unsigned char *data)
        {
        int i;
        BF_LONG *p,ri,in[2];
index 30db62b..983eba5 100644 (file)
@@ -135,8 +135,7 @@ SIGRETTYPE sig_done(int sig);
 SIGRETTYPE sig_done();
 #endif
 
-SIGRETTYPE sig_done(sig)
-int sig;
+SIGRETTYPE sig_done(int sig)
        {
        signal(SIGALRM,sig_done);
        run=0;
@@ -149,8 +148,7 @@ int sig;
 #define START  0
 #define STOP   1
 
-double Time_F(s)
-int s;
+double Time_F(int s)
        {
        double ret;
 #ifdef TIMES
@@ -186,9 +184,7 @@ int s;
 #endif
        }
 
-int main(argc,argv)
-int argc;
-char **argv;
+int main(int argc, char **argv)
        {
        long count;
        static unsigned char buf[BUFSIZE];
index 9266cf8..e66ca04 100644 (file)
@@ -260,9 +260,7 @@ static int test();
 static int print_test_data();
 #endif
 
-int main(argc,argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
        {
        int ret;
 
@@ -275,7 +273,7 @@ char *argv[];
        return(0);
        }
 
-static int print_test_data()
+static int print_test_data(void)
        {
        unsigned int i,j;
 
@@ -342,7 +340,7 @@ static int print_test_data()
        return(0);
        }
 
-static int test()
+static int test(void)
        {
        unsigned char cbc_in[40],cbc_out[40],iv[8];
        int i,n,err=0;
index 5e05af5..839dfeb 100644 (file)
 #define TRUNCATE
 #define DUMP_WIDTH     16
 
-int BIO_dump(bio,s,len)
-BIO *bio;
-const char *s;
-int len;
+int BIO_dump(BIO *bio, const char *s, int len)
 {
   int ret=0;
   char buf[160+1],tmp[20];
index a1a3760..d14a779 100644 (file)
@@ -106,9 +106,7 @@ static void ghbn_free();
 static struct hostent *ghbn_dup();
 #endif
 
-int BIO_get_host_ip(str,ip)
-const char *str;
-unsigned char *ip;
+int BIO_get_host_ip(const char *str, unsigned char *ip)
        {
        int i;
        struct hostent *he;
@@ -146,9 +144,7 @@ unsigned char *ip;
        return(1);
        }
 
-int BIO_get_port(str,port_ptr)
-const char *str;
-unsigned short *port_ptr;
+int BIO_get_port(const char *str, unsigned short *port_ptr)
        {
        int i;
        struct servent *s;
@@ -197,8 +193,7 @@ unsigned short *port_ptr;
        return(1);
        }
 
-int BIO_sock_error(sock)
-int sock;
+int BIO_sock_error(int sock)
        {
        int j,i,size;
                 
@@ -211,10 +206,7 @@ int sock;
                return(j);
        }
 
-long BIO_ghbn_ctrl(cmd,iarg,parg)
-int cmd;
-int iarg;
-char *parg;
+long BIO_ghbn_ctrl(int cmd, int iarg, char *parg)
        {
        int i;
        char **p;
@@ -252,8 +244,7 @@ char *parg;
        return(1);
        }
 
-static struct hostent *ghbn_dup(a)
-struct hostent *a;
+static struct hostent *ghbn_dup(struct hostent *a)
        {
        struct hostent *ret;
        int i,j;
@@ -305,8 +296,7 @@ err:
        return(ret);
        }
 
-static void ghbn_free(a)
-struct hostent *a;
+static void ghbn_free(struct hostent *a)
        {
        int i;
 
@@ -329,8 +319,7 @@ struct hostent *a;
        Free(a);
        }
 
-struct hostent *BIO_gethostbyname(name)
-const char *name;
+struct hostent *BIO_gethostbyname(const char *name)
        {
        struct hostent *ret;
        int i,lowi=0,j;
@@ -385,7 +374,7 @@ const char *name;
        return(ret);
        }
 
-int BIO_sock_init()
+int BIO_sock_init(void)
        {
 #ifdef WINDOWS
        static struct WSAData wsa_state;
@@ -411,7 +400,7 @@ int BIO_sock_init()
        return(1);
        }
 
-void BIO_sock_cleanup()
+void BIO_sock_cleanup(void)
        {
 #ifdef WINDOWS
        if (wsa_init_done)
@@ -423,10 +412,7 @@ void BIO_sock_cleanup()
 #endif
        }
 
-int BIO_socket_ioctl(fd,type,arg)
-int fd;
-long type;
-unsigned long *arg;
+int BIO_socket_ioctl(int fd, long type, unsigned long *arg)
        {
        int i;
 
@@ -438,9 +424,7 @@ unsigned long *arg;
 
 /* The reason I have implemented this instead of using sscanf is because
  * Visual C 1.52c gives an unresolved external when linking a DLL :-( */
-static int get_ip(str,ip)
-const char *str;
-unsigned char ip[4];
+static int get_ip(const char *str, unsigned char ip[4])
        {
        unsigned int tmp[4];
        int num=0,c,ok=0;
@@ -475,9 +459,7 @@ unsigned char ip[4];
        return(1);
        }
 
-int BIO_get_accept_socket(host,bind_mode)
-char *host;
-int bind_mode;
+int BIO_get_accept_socket(char *host, int bind_mode)
        {
        int ret=0;
        struct sockaddr_in server,client;
@@ -604,9 +586,7 @@ err:
        return(s);
        }
 
-int BIO_accept(sock,addr)
-int sock;
-char **addr;
+int BIO_accept(int sock, char **addr)
        {
        int ret=INVALID_SOCKET;
        static struct sockaddr_in from;
@@ -648,9 +628,7 @@ end:
        return(ret);
        }
 
-int BIO_set_tcp_ndelay(s,on)
-int s;
-int on;
+int BIO_set_tcp_ndelay(int s, int on)
        {
        int ret=0;
 #if defined(TCP_NODELAY) && (defined(IPPROTO_TCP) || defined(SOL_TCP))
@@ -670,9 +648,7 @@ int on;
        }
 #endif
 
-int BIO_socket_nbio(s,mode)
-int s;
-int mode;
+int BIO_socket_nbio(int s, int mode)
        {
 &nb