fix warnings when building openssl with the following compiler options:
authorNils Larsch <nils@openssl.org>
Sun, 28 Aug 2005 22:49:57 +0000 (22:49 +0000)
committerNils Larsch <nils@openssl.org>
Sun, 28 Aug 2005 22:49:57 +0000 (22:49 +0000)
        -Wmissing-prototypes -Wcomment -Wformat -Wimplicit -Wmain -Wmultichar
        -Wswitch -Wshadow -Wtrigraphs -Werror -Wchar-subscripts
        -Wstrict-prototypes -Wreturn-type -Wpointer-arith  -W -Wunused
        -Wno-unused-parameter -Wuninitialized

22 files changed:
crypto/asn1/a_strex.c
crypto/asn1/asn1_par.c
crypto/bf/bf_enc.c
crypto/bn/bn.h
crypto/bn/bn_div.c
crypto/bn/bn_gcd.c
crypto/bn/bn_recp.c
crypto/bn/bn_sqr.c
crypto/dso/dso_null.c
crypto/ec/ectest.c
crypto/engine/eng_openssl.c
crypto/evp/e_null.c
crypto/evp/e_rc4.c
crypto/evp/e_xcbc_d.c
crypto/objects/obj_dat.h
crypto/objects/obj_dat.pl
crypto/rand/randtest.c
crypto/rsa/rsa_depr.c
crypto/rsa/rsa_pss.c
crypto/sha/sha256t.c
crypto/sha/sha512t.c
ssl/ssl_lib.c

index cc6a25d4d952c2bfd16df24357b9b93e0f79471e..45fe4bd1508210973500a83d3e71bc56aa5423ef 100644 (file)
@@ -223,7 +223,7 @@ static int do_buf(unsigned char *buf, int buflen,
 
 static int do_hex_dump(char_io *io_ch, void *arg, unsigned char *buf, int buflen)
 {
 
 static int do_hex_dump(char_io *io_ch, void *arg, unsigned char *buf, int buflen)
 {
-       const static char hexdig[] = "0123456789ABCDEF";
+       static const char hexdig[] = "0123456789ABCDEF";
        unsigned char *p, *q;
        char hextmp[2];
        if(arg) {
        unsigned char *p, *q;
        char hextmp[2];
        if(arg) {
@@ -279,7 +279,7 @@ static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, ASN1_STRING
  * otherwise it is the number of bytes per character
  */
 
  * otherwise it is the number of bytes per character
  */
 
-const static signed char tag2nbyte[] = {
+static const signed char tag2nbyte[] = {
        -1, -1, -1, -1, -1,     /* 0-4 */
        -1, -1, -1, -1, -1,     /* 5-9 */
        -1, -1, 0, -1,          /* 10-13 */
        -1, -1, -1, -1, -1,     /* 0-4 */
        -1, -1, -1, -1, -1,     /* 5-9 */
        -1, -1, 0, -1,          /* 10-13 */
index df247f398d4927f5d22998228e9010e7d44b02f4..37aa6b415eb3dc1fa7ed6b49d4548c010ae10fd0 100644 (file)
@@ -419,7 +419,7 @@ end:
 
 const char *ASN1_tag2str(int tag)
 {
 
 const char *ASN1_tag2str(int tag)
 {
-       const static char *tag2str[] = {
+       static const char *tag2str[] = {
         "EOC", "BOOLEAN", "INTEGER", "BIT STRING", "OCTET STRING", /* 0-4 */
         "NULL", "OBJECT", "OBJECT DESCRIPTOR", "EXTERNAL", "REAL", /* 5-9 */
         "ENUMERATED", "<ASN1 11>", "UTF8STRING", "<ASN1 13>",      /* 10-13 */
         "EOC", "BOOLEAN", "INTEGER", "BIT STRING", "OCTET STRING", /* 0-4 */
         "NULL", "OBJECT", "OBJECT DESCRIPTOR", "EXTERNAL", "REAL", /* 5-9 */
         "ENUMERATED", "<ASN1 11>", "UTF8STRING", "<ASN1 13>",      /* 10-13 */
index b380acf9594004322e8f805959ea890cc5dae7b0..2d21d09f425fddedcd7d6468c223e4a61c36a2c2 100644 (file)
@@ -73,7 +73,7 @@ void BF_encrypt(BF_LONG *data, const BF_KEY *key)
        {
 #ifndef BF_PTR2
        register BF_LONG l,r;
        {
 #ifndef BF_PTR2
        register BF_LONG l,r;
-    const register BF_LONG *p,*s;
+       register const BF_LONG *p,*s;
 
        p=key->P;
        s= &(key->S[0]);
 
        p=key->P;
        s= &(key->S[0]);
@@ -150,7 +150,7 @@ void BF_decrypt(BF_LONG *data, const BF_KEY *key)
        {
 #ifndef BF_PTR2
        register BF_LONG l,r;
        {
 #ifndef BF_PTR2
        register BF_LONG l,r;
-    const register BF_LONG *p,*s;
+       register const BF_LONG *p,*s;
 
        p=key->P;
        s= &(key->S[0]);
 
        p=key->P;
        s= &(key->S[0]);
index b990ff2b5d50034ab0eeb3825a6ac60cdc75392c..2688684b63512f17b7a1f346bdda1b4e415f8fea 100644 (file)
@@ -699,9 +699,11 @@ int RAND_pseudo_bytes(unsigned char *buf,int num);
 #define bn_check_top(a) \
        do { \
                const BIGNUM *_bnum2 = (a); \
 #define bn_check_top(a) \
        do { \
                const BIGNUM *_bnum2 = (a); \
-               assert((_bnum2->top == 0) || \
+               if (_bnum2 != NULL) { \
+                       assert((_bnum2->top == 0) || \
                                (_bnum2->d[_bnum2->top - 1] != 0)); \
                                (_bnum2->d[_bnum2->top - 1] != 0)); \
-               bn_pollute(_bnum2); \
+                       bn_pollute(_bnum2); \
+               } \
        } while(0)
 
 #define bn_fix_top(a)          bn_check_top(a)
        } while(0)
 
 #define bn_fix_top(a)          bn_check_top(a)
index 3b4392955e070e9d97e48b581d8079c34cfc9439..2857f44861a702bfc85e380e99db562a7c07ec13 100644 (file)
@@ -185,10 +185,8 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
        BN_ULONG d0,d1;
        int num_n,div_n;
 
        BN_ULONG d0,d1;
        int num_n,div_n;
 
-       if (dv)
-               bn_check_top(dv);
-       if (rm)
-               bn_check_top(rm);
+       bn_check_top(dv);
+       bn_check_top(rm);
        bn_check_top(num);
        bn_check_top(divisor);
 
        bn_check_top(num);
        bn_check_top(divisor);
 
@@ -394,8 +392,7 @@ X) -> 0x%08X\n",
        BN_CTX_end(ctx);
        return(1);
 err:
        BN_CTX_end(ctx);
        return(1);
 err:
-       if (rm)
-               bn_check_top(rm);
+       bn_check_top(rm);
        BN_CTX_end(ctx);
        return(0);
        }
        BN_CTX_end(ctx);
        return(0);
        }
index 0248753f6dc9a0f1499fb19d092d0c7d5b37b640..f02e6fcdb422903cff18eaeba6b7ee9313dfe09f 100644 (file)
@@ -488,7 +488,6 @@ BIGNUM *BN_mod_inverse(BIGNUM *in,
 err:
        if ((ret == NULL) && (in == NULL)) BN_free(R);
        BN_CTX_end(ctx);
 err:
        if ((ret == NULL) && (in == NULL)) BN_free(R);
        BN_CTX_end(ctx);
-       if (ret)
-               bn_check_top(ret);
+       bn_check_top(ret);
        return(ret);
        }
        return(ret);
        }
index 10fe869d28e204f019795e74ae53165adcd534e4..2e8efb8dae29ac2f5473299ae2bcb9e4752c1f5c 100644 (file)
@@ -204,8 +204,8 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
        ret=1;
 err:
        BN_CTX_end(ctx);
        ret=1;
 err:
        BN_CTX_end(ctx);
-       if(dv) bn_check_top(dv);
-       if(rem) bn_check_top(rem);
+       bn_check_top(dv);
+       bn_check_top(rem);
        return(ret);
        } 
 
        return(ret);
        } 
 
index 3b4b3f0d38350d642c0e83b6597e218dea3766da..270d0cd348b90056f14ce429676b700cd577118b 100644 (file)
@@ -148,8 +148,8 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
        if (rr != r) BN_copy(r,rr);
        ret = 1;
  err:
        if (rr != r) BN_copy(r,rr);
        ret = 1;
  err:
-       if(rr) bn_check_top(rr);
-       if(tmp) bn_check_top(tmp);
+       bn_check_top(rr);
+       bn_check_top(tmp);
        BN_CTX_end(ctx);
        return(ret);
        }
        BN_CTX_end(ctx);
        return(ret);
        }
index fa13a7cb0f185f2ccbd78c3db8a4e0933b9bd9bd..a213f930888fbc19643e8fef28cb9351cc047b6c 100644 (file)
@@ -75,8 +75,11 @@ static DSO_METHOD dso_meth_null = {
        NULL, /* unbind_func */
 #endif
        NULL, /* ctrl */
        NULL, /* unbind_func */
 #endif
        NULL, /* ctrl */
+       NULL, /* dso_name_converter */
+       NULL, /* dso_merger */
        NULL, /* init */
        NULL, /* init */
-       NULL  /* finish */
+       NULL, /* finish */
+       NULL  /* pathbyaddr */
        };
 
 DSO_METHOD *DSO_METHOD_null(void)
        };
 
 DSO_METHOD *DSO_METHOD_null(void)
index 57f7eccf5f6c4c9ea59886f95d75d67455ed39bb..85f63c00bbdf74f8a896d4c75d736440cb4cd62f 100644 (file)
@@ -231,7 +231,7 @@ void prime_field_tests()
                EC_GROUP *tmp;
                tmp = EC_GROUP_new(EC_GROUP_method_of(group));
                if (!tmp) ABORT;
                EC_GROUP *tmp;
                tmp = EC_GROUP_new(EC_GROUP_method_of(group));
                if (!tmp) ABORT;
-               if (!EC_GROUP_copy(tmp, group));
+               if (!EC_GROUP_copy(tmp, group)) ABORT;
                EC_GROUP_free(group);
                group = tmp;
        }
                EC_GROUP_free(group);
                group = tmp;
        }
@@ -834,7 +834,7 @@ void char2_field_tests()
                EC_GROUP *tmp;
                tmp = EC_GROUP_new(EC_GROUP_method_of(group));
                if (!tmp) ABORT;
                EC_GROUP *tmp;
                tmp = EC_GROUP_new(EC_GROUP_method_of(group));
                if (!tmp) ABORT;
-               if (!EC_GROUP_copy(tmp, group));
+               if (!EC_GROUP_copy(tmp, group)) ABORT;
                EC_GROUP_free(group);
                group = tmp;
        }
                EC_GROUP_free(group);
                group = tmp;
        }
index 5341daaf4eb7b2bb7cbdec185d7e36c34bb1d6be..7c139ae2efcb44754cb273cf2176b1763f71c5c8 100644 (file)
@@ -257,6 +257,7 @@ static const EVP_CIPHER test_r4_cipher=
        sizeof(TEST_RC4_KEY),
        NULL,
        NULL,
        sizeof(TEST_RC4_KEY),
        NULL,
        NULL,
+       NULL,
        NULL
        };
 static const EVP_CIPHER test_r4_40_cipher=
        NULL
        };
 static const EVP_CIPHER test_r4_40_cipher=
@@ -270,6 +271,7 @@ static const EVP_CIPHER test_r4_40_cipher=
        sizeof(TEST_RC4_KEY),
        NULL, 
        NULL,
        sizeof(TEST_RC4_KEY),
        NULL, 
        NULL,
+       NULL,
        NULL
        };
 static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
        NULL
        };
 static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
index 698a8e379c9ba8d2cee6c4255cbad2a085e7ddfb..5205259f18ca2249a5cfaaef1140b6df8b4d2c4b 100644 (file)
@@ -76,6 +76,7 @@ static const EVP_CIPHER n_cipher=
        0,
        NULL,
        NULL,
        0,
        NULL,
        NULL,
+       NULL,
        NULL
        };
 
        NULL
        };
 
index eadd8d42741e9c6c71fcea5b584d817d470f9154..67af850bea1ab955cdc3159bd57bb9f8a55c3b73 100644 (file)
@@ -90,6 +90,7 @@ static const EVP_CIPHER r4_cipher=
        sizeof(EVP_RC4_KEY),
        NULL,
        NULL,
        sizeof(EVP_RC4_KEY),
        NULL,
        NULL,
+       NULL,
        NULL
        };
 
        NULL
        };
 
@@ -104,6 +105,7 @@ static const EVP_CIPHER r4_40_cipher=
        sizeof(EVP_RC4_KEY),
        NULL, 
        NULL,
        sizeof(EVP_RC4_KEY),
        NULL, 
        NULL,
+       NULL,
        NULL
        };
 
        NULL
        };
 
index cb82815a8260824aeea0bf2b7c50d067d27165b6..8832da24333cbf7cd8121dccb505bc36b11a2164 100644 (file)
@@ -91,6 +91,7 @@ static const EVP_CIPHER d_xcbc_cipher=
        sizeof(DESX_CBC_KEY),
        EVP_CIPHER_set_asn1_iv,
        EVP_CIPHER_get_asn1_iv,
        sizeof(DESX_CBC_KEY),
        EVP_CIPHER_set_asn1_iv,
        EVP_CIPHER_get_asn1_iv,
+       NULL,
        NULL
        };
 
        NULL
        };
 
index ae6b1794e43e22d130c21543629888e6d0a9c058..c8145a69f9c45d06e11b337c6798b378105f5cf5 100644 (file)
@@ -825,21 +825,21 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
 {"DES-CFB","des-cfb",NID_des_cfb64,5,&(lvalues[192]),0},
 {"DES-CBC","des-cbc",NID_des_cbc,5,&(lvalues[197]),0},
 {"DES-EDE","des-ede",NID_des_ede_ecb,5,&(lvalues[202]),0},
 {"DES-CFB","des-cfb",NID_des_cfb64,5,&(lvalues[192]),0},
 {"DES-CBC","des-cbc",NID_des_cbc,5,&(lvalues[197]),0},
 {"DES-EDE","des-ede",NID_des_ede_ecb,5,&(lvalues[202]),0},
-{"DES-EDE3","des-ede3",NID_des_ede3_ecb,0,NULL},
+{"DES-EDE3","des-ede3",NID_des_ede3_ecb,0,NULL,0},
 {"IDEA-CBC","idea-cbc",NID_idea_cbc,11,&(lvalues[207]),0},
 {"IDEA-CBC","idea-cbc",NID_idea_cbc,11,&(lvalues[207]),0},
-{"IDEA-CFB","idea-cfb",NID_idea_cfb64,0,NULL},
-{"IDEA-ECB","idea-ecb",NID_idea_ecb,0,NULL},
+{"IDEA-CFB","idea-cfb",NID_idea_cfb64,0,NULL,0},
+{"IDEA-ECB","idea-ecb",NID_idea_ecb,0,NULL,0},
 {"RC2-CBC","rc2-cbc",NID_rc2_cbc,8,&(lvalues[218]),0},
 {"RC2-CBC","rc2-cbc",NID_rc2_cbc,8,&(lvalues[218]),0},
-{"RC2-ECB","rc2-ecb",NID_rc2_ecb,0,NULL},
-{"RC2-CFB","rc2-cfb",NID_rc2_cfb64,0,NULL},
-{"RC2-OFB","rc2-ofb",NID_rc2_ofb64,0,NULL},
+{"RC2-ECB","rc2-ecb",NID_rc2_ecb,0,NULL,0},
+{"RC2-CFB","rc2-cfb",NID_rc2_cfb64,0,NULL,0},
+{"RC2-OFB","rc2-ofb",NID_rc2_ofb64,0,NULL,0},
 {"SHA","sha",NID_sha,5,&(lvalues[226]),0},
 {"RSA-SHA","shaWithRSAEncryption",NID_shaWithRSAEncryption,5,
        &(lvalues[231]),0},
 {"SHA","sha",NID_sha,5,&(lvalues[226]),0},
 {"RSA-SHA","shaWithRSAEncryption",NID_shaWithRSAEncryption,5,
        &(lvalues[231]),0},
-{"DES-EDE-CBC","des-ede-cbc",NID_des_ede_cbc,0,NULL},
+{"DES-EDE-CBC","des-ede-cbc",NID_des_ede_cbc,0,NULL,0},
 {"DES-EDE3-CBC","des-ede3-cbc",NID_des_ede3_cbc,8,&(lvalues[236]),0},
 {"DES-OFB","des-ofb",NID_des_ofb64,5,&(lvalues[244]),0},
 {"DES-EDE3-CBC","des-ede3-cbc",NID_des_ede3_cbc,8,&(lvalues[236]),0},
 {"DES-OFB","des-ofb",NID_des_ofb64,5,&(lvalues[244]),0},
-{"IDEA-OFB","idea-ofb",NID_idea_ofb64,0,NULL},
+{"IDEA-OFB","idea-ofb",NID_idea_ofb64,0,NULL,0},
 {"pkcs9","pkcs9",NID_pkcs9,8,&(lvalues[249]),0},
 {"emailAddress","emailAddress",NID_pkcs9_emailAddress,9,
        &(lvalues[257]),0},
 {"pkcs9","pkcs9",NID_pkcs9,8,&(lvalues[249]),0},
 {"emailAddress","emailAddress",NID_pkcs9_emailAddress,9,
        &(lvalues[257]),0},
@@ -863,10 +863,10 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
        NID_netscape_cert_extension,8,&(lvalues[345]),0},
 {"nsDataType","Netscape Data Type",NID_netscape_data_type,8,
        &(lvalues[353]),0},
        NID_netscape_cert_extension,8,&(lvalues[345]),0},
 {"nsDataType","Netscape Data Type",NID_netscape_data_type,8,
        &(lvalues[353]),0},
-{"DES-EDE-CFB","des-ede-cfb",NID_des_ede_cfb64,0,NULL},
-{"DES-EDE3-CFB","des-ede3-cfb",NID_des_ede3_cfb64,0,NULL},
-{"DES-EDE-OFB","des-ede-ofb",NID_des_ede_ofb64,0,NULL},
-{"DES-EDE3-OFB","des-ede3-ofb",NID_des_ede3_ofb64,0,NULL},
+{"DES-EDE-CFB","des-ede-cfb",NID_des_ede_cfb64,0,NULL,0},
+{"DES-EDE3-CFB","des-ede3-cfb",NID_des_ede3_cfb64,0,NULL,0},
+{"DES-EDE-OFB","des-ede-ofb",NID_des_ede_ofb64,0,NULL,0},
+{"DES-EDE3-OFB","des-ede3-ofb",NID_des_ede3_ofb64,0,NULL,0},
 {"SHA1","sha1",NID_sha1,5,&(lvalues[361]),0},
 {"RSA-SHA1","sha1WithRSAEncryption",NID_sha1WithRSAEncryption,9,
        &(lvalues[366]),0},
 {"SHA1","sha1",NID_sha1,5,&(lvalues[361]),0},
 {"RSA-SHA1","sha1WithRSAEncryption",NID_sha1WithRSAEncryption,9,
        &(lvalues[366]),0},
@@ -893,7 +893,7 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
 {"nsComment","Netscape Comment",NID_netscape_comment,9,&(lvalues[471]),0},
 {"nsCertSequence","Netscape Certificate Sequence",
        NID_netscape_cert_sequence,9,&(lvalues[480]),0},
 {"nsComment","Netscape Comment",NID_netscape_comment,9,&(lvalues[471]),0},
 {"nsCertSequence","Netscape Certificate Sequence",
        NID_netscape_cert_sequence,9,&(lvalues[480]),0},
-{"DESX-CBC","desx-cbc",NID_desx_cbc,0,NULL},
+{"DESX-CBC","desx-cbc",NID_desx_cbc,0,NULL,0},
 {"id-ce","id-ce",NID_id_ce,2,&(lvalues[489]),0},
 {"subjectKeyIdentifier","X509v3 Subject Key Identifier",
        NID_subject_key_identifier,3,&(lvalues[491]),0},
 {"id-ce","id-ce",NID_id_ce,2,&(lvalues[489]),0},
 {"subjectKeyIdentifier","X509v3 Subject Key Identifier",
        NID_subject_key_identifier,3,&(lvalues[491]),0},
@@ -912,17 +912,17 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
 {"authorityKeyIdentifier","X509v3 Authority Key Identifier",
        NID_authority_key_identifier,3,&(lvalues[515]),0},
 {"BF-CBC","bf-cbc",NID_bf_cbc,9,&(lvalues[518]),0},
 {"authorityKeyIdentifier","X509v3 Authority Key Identifier",
        NID_authority_key_identifier,3,&(lvalues[515]),0},
 {"BF-CBC","bf-cbc",NID_bf_cbc,9,&(lvalues[518]),0},
-{"BF-ECB","bf-ecb",NID_bf_ecb,0,NULL},
-{"BF-CFB","bf-cfb",NID_bf_cfb64,0,NULL},
-{"BF-OFB","bf-ofb",NID_bf_ofb64,0,NULL},
+{"BF-ECB","bf-ecb",NID_bf_ecb,0,NULL,0},
+{"BF-CFB","bf-cfb",NID_bf_cfb64,0,NULL,0},
+{"BF-OFB","bf-ofb",NID_bf_ofb64,0,NULL,0},
 {"MDC2","mdc2",NID_mdc2,4,&(lvalues[527]),0},
 {"RSA-MDC2","mdc2WithRSA",NID_mdc2WithRSA,4,&(lvalues[531]),0},
 {"MDC2","mdc2",NID_mdc2,4,&(lvalues[527]),0},
 {"RSA-MDC2","mdc2WithRSA",NID_mdc2WithRSA,4,&(lvalues[531]),0},
-{"RC4-40","rc4-40",NID_rc4_40,0,NULL},
-{"RC2-40-CBC","rc2-40-cbc",NID_rc2_40_cbc,0,NULL},
+{"RC4-40","rc4-40",NID_rc4_40,0,NULL,0},
+{"RC2-40-CBC","rc2-40-cbc",NID_rc2_40_cbc,0,NULL,0},
 {"GN","givenName",NID_givenName,3,&(lvalues[535]),0},
 {"SN","surname",NID_surname,3,&(lvalues[538]),0},
 {"initials","initials",NID_initials,3,&(lvalues[541]),0},
 {"GN","givenName",NID_givenName,3,&(lvalues[535]),0},
 {"SN","surname",NID_surname,3,&(lvalues[538]),0},
 {"initials","initials",NID_initials,3,&(lvalues[541]),0},
-{NULL,NULL,NID_undef,0,NULL},
+{NULL,NULL,NID_undef,0,NULL,0},
 {"crlDistributionPoints","X509v3 CRL Distribution Points",
        NID_crl_distribution_points,3,&(lvalues[544]),0},
 {"RSA-NP-MD5","md5WithRSA",NID_md5WithRSA,5,&(lvalues[547]),0},
 {"crlDistributionPoints","X509v3 CRL Distribution Points",
        NID_crl_distribution_points,3,&(lvalues[544]),0},
 {"RSA-NP-MD5","md5WithRSA",NID_md5WithRSA,5,&(lvalues[547]),0},
@@ -930,23 +930,23 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
 {"title","title",NID_title,3,&(lvalues[555]),0},
 {"description","description",NID_description,3,&(lvalues[558]),0},
 {"CAST5-CBC","cast5-cbc",NID_cast5_cbc,9,&(lvalues[561]),0},
 {"title","title",NID_title,3,&(lvalues[555]),0},
 {"description","description",NID_description,3,&(lvalues[558]),0},
 {"CAST5-CBC","cast5-cbc",NID_cast5_cbc,9,&(lvalues[561]),0},
-{"CAST5-ECB","cast5-ecb",NID_cast5_ecb,0,NULL},
-{"CAST5-CFB","cast5-cfb",NID_cast5_cfb64,0,NULL},
-{"CAST5-OFB","cast5-ofb",NID_cast5_ofb64,0,NULL},
+{"CAST5-ECB","cast5-ecb",NID_cast5_ecb,0,NULL,0},
+{"CAST5-CFB","cast5-cfb",NID_cast5_cfb64,0,NULL,0},
+{"CAST5-OFB","cast5-ofb",NID_cast5_ofb64,0,NULL,0},
 {"pbeWithMD5AndCast5CBC","pbeWithMD5AndCast5CBC",
        NID_pbeWithMD5AndCast5_CBC,9,&(lvalues[570]),0},
 {"DSA-SHA1","dsaWithSHA1",NID_dsaWithSHA1,7,&(lvalues[579]),0},
 {"pbeWithMD5AndCast5CBC","pbeWithMD5AndCast5CBC",
        NID_pbeWithMD5AndCast5_CBC,9,&(lvalues[570]),0},
 {"DSA-SHA1","dsaWithSHA1",NID_dsaWithSHA1,7,&(lvalues[579]),0},
-{"MD5-SHA1","md5-sha1",NID_md5_sha1,0,NULL},
+{"MD5-SHA1","md5-sha1",NID_md5_sha1,0,NULL,0},
 {"RSA-SHA1-2","sha1WithRSA",NID_sha1WithRSA,5,&(lvalues[586]),0},
 {"DSA","dsaEncryption",NID_dsa,7,&(lvalues[591]),0},
 {"RIPEMD160","ripemd160",NID_ripemd160,5,&(lvalues[598]),0},
 {"RSA-SHA1-2","sha1WithRSA",NID_sha1WithRSA,5,&(lvalues[586]),0},
 {"DSA","dsaEncryption",NID_dsa,7,&(lvalues[591]),0},
 {"RIPEMD160","ripemd160",NID_ripemd160,5,&(lvalues[598]),0},
-{NULL,NULL,NID_undef,0,NULL},
+{NULL,NULL,NID_undef,0,NULL,0},
 {"RSA-RIPEMD160","ripemd160WithRSA",NID_ripemd160WithRSA,6,
        &(lvalues[603]),0},
 {"RC5-CBC","rc5-cbc",NID_rc5_cbc,8,&(lvalues[609]),0},
 {"RSA-RIPEMD160","ripemd160WithRSA",NID_ripemd160WithRSA,6,
        &(lvalues[603]),0},
 {"RC5-CBC","rc5-cbc",NID_rc5_cbc,8,&(lvalues[609]),0},
-{"RC5-ECB","rc5-ecb",NID_rc5_ecb,0,NULL},
-{"RC5-CFB","rc5-cfb",NID_rc5_cfb64,0,NULL},
-{"RC5-OFB","rc5-ofb",NID_rc5_ofb64,0,NULL},
+{"RC5-ECB","rc5-ecb",NID_rc5_ecb,0,NULL,0},
+{"RC5-CFB","rc5-cfb",NID_rc5_cfb64,0,NULL,0},
+{"RC5-OFB","rc5-ofb",NID_rc5_ofb64,0,NULL,0},
 {"RLE","run length compression",NID_rle_compression,6,&(lvalues[617]),0},
 {"ZLIB","zlib compression",NID_zlib_compression,6,&(lvalues[623]),0},
 {"extendedKeyUsage","X509v3 Extended Key Usage",NID_ext_key_usage,3,
 {"RLE","run length compression",NID_rle_compression,6,&(lvalues[617]),0},
 {"ZLIB","zlib compression",NID_zlib_compression,6,&(lvalues[623]),0},
 {"extendedKeyUsage","X509v3 Extended Key Usage",NID_ext_key_usage,3,
@@ -1010,7 +1010,7 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
 {"id-qt-cps","Policy Qualifier CPS",NID_id_qt_cps,8,&(lvalues[958]),0},
 {"id-qt-unotice","Policy Qualifier User Notice",NID_id_qt_unotice,8,
        &(lvalues[966]),0},
 {"id-qt-cps","Policy Qualifier CPS",NID_id_qt_cps,8,&(lvalues[958]),0},
 {"id-qt-unotice","Policy Qualifier User Notice",NID_id_qt_unotice,8,
        &(lvalues[966]),0},
-{"RC2-64-CBC","rc2-64-cbc",NID_rc2_64_cbc,0,NULL},
+{"RC2-64-CBC","rc2-64-cbc",NID_rc2_64_cbc,0,NULL,0},
 {"SMIME-CAPS","S/MIME Capabilities",NID_SMIMECapabilities,9,
        &(lvalues[974]),0},
 {"PBE-MD2-RC2-64","pbeWithMD2AndRC2-CBC",NID_pbeWithMD2AndRC2_CBC,9,
 {"SMIME-CAPS","S/MIME Capabilities",NID_SMIMECapabilities,9,
        &(lvalues[974]),0},
 {"PBE-MD2-RC2-64","pbeWithMD2AndRC2-CBC",NID_pbeWithMD2AndRC2_CBC,9,
@@ -1331,7 +1331,7 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
        &(lvalues[2588]),0},
 {"id-pda-placeOfBirth","id-pda-placeOfBirth",NID_id_pda_placeOfBirth,
        8,&(lvalues[2596]),0},
        &(lvalues[2588]),0},
 {"id-pda-placeOfBirth","id-pda-placeOfBirth",NID_id_pda_placeOfBirth,
        8,&(lvalues[2596]),0},
-{NULL,NULL,NID_undef,0,NULL},
+{NULL,NULL,NID_undef,0,NULL,0},
 {"id-pda-gender","id-pda-gender",NID_id_pda_gender,8,&(lvalues[2604]),0},
 {"id-pda-countryOfCitizenship","id-pda-countryOfCitizenship",
        NID_id_pda_countryOfCitizenship,8,&(lvalues[2612]),0},
 {"id-pda-gender","id-pda-gender",NID_id_pda_gender,8,&(lvalues[2604]),0},
 {"id-pda-countryOfCitizenship","id-pda-countryOfCitizenship",
        NID_id_pda_countryOfCitizenship,8,&(lvalues[2612]),0},
@@ -1563,7 +1563,7 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
 {"generationQualifier","generationQualifier",NID_generationQualifier,
        3,&(lvalues[3877]),0},
 {"pseudonym","pseudonym",NID_pseudonym,3,&(lvalues[3880]),0},
 {"generationQualifier","generationQualifier",NID_generationQualifier,
        3,&(lvalues[3877]),0},
 {"pseudonym","pseudonym",NID_pseudonym,3,&(lvalues[3880]),0},
-{NULL,NULL,NID_undef,0,NULL},
+{NULL,NULL,NID_undef,0,NULL,0},
 {"id-set","Secure Electronic Transactions",NID_id_set,2,
        &(lvalues[3883]),0},
 {"set-ctype","content types",NID_set_ctype,3,&(lvalues[3885]),0},
 {"id-set","Secure Electronic Transactions",NID_id_set,2,
        &(lvalues[3883]),0},
 {"set-ctype","content types",NID_set_ctype,3,&(lvalues[3885]),0},
@@ -1822,16 +1822,16 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
        10,&(lvalues[4437]),0},
 {"msUPN","Microsoft Universal Principal Name",NID_ms_upn,10,
        &(lvalues[4447]),0},
        10,&(lvalues[4437]),0},
 {"msUPN","Microsoft Universal Principal Name",NID_ms_upn,10,
        &(lvalues[4447]),0},
-{"AES-128-CFB1","aes-128-cfb1",NID_aes_128_cfb1,0,NULL},
-{"AES-192-CFB1","aes-192-cfb1",NID_aes_192_cfb1,0,NULL},
-{"AES-256-CFB1","aes-256-cfb1",NID_aes_256_cfb1,0,NULL},
-{"AES-128-CFB8","aes-128-cfb8",NID_aes_128_cfb8,0,NULL},
-{"AES-192-CFB8","aes-192-cfb8",NID_aes_192_cfb8,0,NULL},
-{"AES-256-CFB8","aes-256-cfb8",NID_aes_256_cfb8,0,NULL},
-{"DES-CFB1","des-cfb1",NID_des_cfb1,0,NULL},
-{"DES-CFB8","des-cfb8",NID_des_cfb8,0,NULL},
-{"DES-EDE3-CFB1","des-ede3-cfb1",NID_des_ede3_cfb1,0,NULL},
-{"DES-EDE3-CFB8","des-ede3-cfb8",NID_des_ede3_cfb8,0,NULL},
+{"AES-128-CFB1","aes-128-cfb1",NID_aes_128_cfb1,0,NULL,0},
+{"AES-192-CFB1","aes-192-cfb1",NID_aes_192_cfb1,0,NULL,0},
+{"AES-256-CFB1","aes-256-cfb1",NID_aes_256_cfb1,0,NULL,0},
+{"AES-128-CFB8","aes-128-cfb8",NID_aes_128_cfb8,0,NULL,0},
+{"AES-192-CFB8","aes-192-cfb8",NID_aes_192_cfb8,0,NULL,0},
+{"AES-256-CFB8","aes-256-cfb8",NID_aes_256_cfb8,0,NULL,0},
+{"DES-CFB1","des-cfb1",NID_des_cfb1,0,NULL,0},
+{"DES-CFB8","des-cfb8",NID_des_cfb8,0,NULL,0},
+{"DES-EDE3-CFB1","des-ede3-cfb1",NID_des_ede3_cfb1,0,NULL,0},
+{"DES-EDE3-CFB8","des-ede3-cfb8",NID_des_ede3_cfb8,0,NULL,0},
 {"streetAddress","streetAddress",NID_streetAddress,3,&(lvalues[4457]),0},
 {"postalCode","postalCode",NID_postalCode,3,&(lvalues[4460]),0},
 {"identified-organization","identified-organization",
 {"streetAddress","streetAddress",NID_streetAddress,3,&(lvalues[4457]),0},
 {"postalCode","postalCode",NID_postalCode,3,&(lvalues[4460]),0},
 {"identified-organization","identified-organization",
@@ -1936,8 +1936,8 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
 {"SHA384","sha384",NID_sha384,9,&(lvalues[4935]),0},
 {"SHA512","sha512",NID_sha512,9,&(lvalues[4944]),0},
 {"SHA224","sha224",NID_sha224,9,&(lvalues[4953]),0},
 {"SHA384","sha384",NID_sha384,9,&(lvalues[4935]),0},
 {"SHA512","sha512",NID_sha512,9,&(lvalues[4944]),0},
 {"SHA224","sha224",NID_sha224,9,&(lvalues[4953]),0},
-{"Oakley-EC2N-3","ipsec3",NID_ipsec3,0,NULL},
-{"Oakley-EC2N-4","ipsec4",NID_ipsec4,0,NULL},
+{"Oakley-EC2N-3","ipsec3",NID_ipsec3,0,NULL,0},
+{"Oakley-EC2N-4","ipsec4",NID_ipsec4,0,NULL,0},
 {"id-ppl","id-ppl",NID_id_ppl,7,&(lvalues[4962]),0},
 {"proxyCertInfo","Proxy Certificate Information",NID_proxyCertInfo,8,
        &(lvalues[4969]),0},
 {"id-ppl","id-ppl",NID_id_ppl,7,&(lvalues[4962]),0},
 {"proxyCertInfo","Proxy Certificate Information",NID_proxyCertInfo,8,
        &(lvalues[4969]),0},
index d0371661f9739e4f764aca8deb46588d586d68ae..8a09a46ee659c62bea17e0f9aab426e658ed73ed 100644 (file)
@@ -94,7 +94,7 @@ for ($i=0; $i<$n; $i++)
        {
        if (!defined($nid{$i}))
                {
        {
        if (!defined($nid{$i}))
                {
-               push(@out,"{NULL,NULL,NID_undef,0,NULL},\n");
+               push(@out,"{NULL,NULL,NID_undef,0,NULL,0},\n");
                }
        else
                {
                }
        else
                {
@@ -138,7 +138,7 @@ for ($i=0; $i<$n; $i++)
                        }
                else
                        {
                        }
                else
                        {
-                       $out.="0,NULL";
+                       $out.="0,NULL,0";
                        }
                $out.="},\n";
                push(@out,$out);
                        }
                $out.="},\n";
                push(@out,$out);
index ef057c2c3132b9a2bb7d451598d94c2c7a989f50..9e92a70b033c032de9e23983f1a63b9fb59d11ce 100644 (file)
@@ -65,7 +65,7 @@
 /* some FIPS 140-1 random number test */
 /* some simple tests */
 
 /* some FIPS 140-1 random number test */
 /* some simple tests */
 
-int main()
+int main(int argc,char **argv)
        {
        unsigned char buf[2500];
        int i,j,k,s,sign,nsign,err=0;
        {
        unsigned char buf[2500];
        int i,j,k,s,sign,nsign,err=0;
index 73fa6eea90742cdca37555ad231110f91aa4f4ca..c5582b996d24cdf66426aaf9127c0dd3540c6039 100644 (file)
@@ -80,7 +80,7 @@ RSA *RSA_generate_key(int bits, unsigned long e_value,
 
        /* The problem is when building with 8, 16, or 32 BN_ULONG,
         * unsigned long can be larger */
 
        /* The problem is when building with 8, 16, or 32 BN_ULONG,
         * unsigned long can be larger */
-       for (i=0; i<sizeof(unsigned long)*8; i++)
+       for (i=0; i<(int)sizeof(unsigned long)*8; i++)
                {
                if (e_value & (1UL<<i))
                        BN_set_bit(e,i);
                {
                if (e_value & (1UL<<i))
                        BN_set_bit(e,i);
index 3280c9d40c0c63b767fbb31bb457848ced23c664..e19d18c5b9376543c14c1b814f192966d7a55bd0 100644 (file)
@@ -64,7 +64,7 @@
 #include <openssl/rand.h>
 #include <openssl/sha.h>
 
 #include <openssl/rand.h>
 #include <openssl/sha.h>
 
-const static unsigned char zeroes[] = {0,0,0,0,0,0,0,0};
+static const unsigned char zeroes[] = {0,0,0,0,0,0,0,0};
 
 #if defined(_MSC_VER) && defined(_ARM_)
 #pragma optimize("g", off)
 
 #if defined(_MSC_VER) && defined(_ARM_)
 #pragma optimize("g", off)
index 68184b258241d50d90df39f4c6f11ba649e5cc8e..6b4a3bd001bafcda54208f8c6109a3e8298b078f 100644 (file)
@@ -54,7 +54,7 @@ unsigned char addenum_3[SHA224_DIGEST_LENGTH] = {
        0xf0,0x3f,0x42,0x58,0x19,0x48,0xb2,0xee,
        0x4e,0xe7,0xad,0x67 };
 
        0xf0,0x3f,0x42,0x58,0x19,0x48,0xb2,0xee,
        0x4e,0xe7,0xad,0x67 };
 
-int main ()
+int main (int argc,char **argv)
 { unsigned char md[SHA256_DIGEST_LENGTH];
   int          i;
   EVP_MD_CTX   evp;
 { unsigned char md[SHA256_DIGEST_LENGTH];
   int          i;
   EVP_MD_CTX   evp;
index 4b7b3ceaa36bf2ffaca1670a8bbf2a5a169d760d..210041d435c6d06f5bce7a9c8493f8e732e80e31 100644 (file)
@@ -73,7 +73,7 @@ unsigned char app_d3[SHA384_DIGEST_LENGTH] = {
        0x07,0xb8,0xb3,0xdc,0x38,0xec,0xc4,0xeb,
        0xae,0x97,0xdd,0xd8,0x7f,0x3d,0x89,0x85 };
 
        0x07,0xb8,0xb3,0xdc,0x38,0xec,0xc4,0xeb,
        0xae,0x97,0xdd,0xd8,0x7f,0x3d,0x89,0x85 };
 
-int main ()
+int main (int argc,char **argv)
 { unsigned char md[SHA512_DIGEST_LENGTH];
   int          i;
   EVP_MD_CTX   evp;
 { unsigned char md[SHA512_DIGEST_LENGTH];
   int          i;
   EVP_MD_CTX   evp;
index 6955215c1f6b21ffabb533a20162318471bbd99c..9e18e776b9bf10e62885110925d3c76849fca535 100644 (file)
@@ -138,7 +138,14 @@ SSL3_ENC_METHOD ssl3_undef_enc_method={
        ssl_undefined_function,
        (int (*)(SSL *, unsigned char *, unsigned char *, int))ssl_undefined_function,
        (int (*)(SSL*, int))ssl_undefined_function,
        ssl_undefined_function,
        (int (*)(SSL *, unsigned char *, unsigned char *, int))ssl_undefined_function,
        (int (*)(SSL*, int))ssl_undefined_function,
-       (int (*)(SSL *, EVP_MD_CTX *, EVP_MD_CTX *, const char*, int, unsigned char *))ssl_undefined_function
+       (int (*)(SSL *, EVP_MD_CTX *, EVP_MD_CTX *, const char*, int, unsigned char *))ssl_undefined_function,
+       0,      /* finish_mac_length */
+       (int (*)(SSL *, EVP_MD_CTX *, unsigned char *))ssl_undefined_function,
+       NULL,   /* client_finished_label */
+       0,      /* client_finished_label_len */
+       NULL,   /* server_finished_label */
+       0,      /* server_finished_label_len */
+       (int (*)(int))ssl_undefined_function
        };
 
 int SSL_clear(SSL *s)
        };
 
 int SSL_clear(SSL *s)