fix warnings when building openssl with (gcc 3.3.1):
authorNils Larsch <nils@openssl.org>
Sun, 28 Aug 2005 23:20:52 +0000 (23:20 +0000)
committerNils Larsch <nils@openssl.org>
Sun, 28 Aug 2005 23:20:52 +0000 (23:20 +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

27 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/rand_unix.c
crypto/rand/randtest.c
crypto/rc4/rc4test.c
crypto/rsa/rsa_depr.c
crypto/rsa/rsa_pss.c
crypto/sha/sha512t.c
engines/e_cswift.c
ssl/d1_both.c
ssl/d1_clnt.c
ssl/d1_srvr.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)
 {
-       const static char hexdig[] = "0123456789ABCDEF";
+       static const char hexdig[] = "0123456789ABCDEF";
        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
  */
 
-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 */
index df247f398d4927f5d22998228e9010e7d44b02f4..37aa6b415eb3dc1fa7ed6b49d4548c010ae10fd0 100644 (file)
@@ -419,7 +419,7 @@ end:
 
 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 */
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;
-    const register BF_LONG *p,*s;
+       register const BF_LONG *p,*s;
 
        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;
-    const register BF_LONG *p,*s;
+       register const BF_LONG *p,*s;
 
        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); \
-               assert((_bnum2->top == 0) || \
+               if (_bnum2 != NULL) { \
+                       assert((_bnum2->top == 0) || \
                                (_bnum2->d[_bnum2->top - 1] != 0)); \
-               bn_pollute(_bnum2); \
+                       bn_pollute(_bnum2); \
+               } \
        } 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;
 
-       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);
 
@@ -394,8 +392,7 @@ X) -> 0x%08X\n",
        BN_CTX_end(ctx);
        return(1);
 err:
-       if (rm)
-               bn_check_top(rm);
+       bn_check_top(rm);
        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);
-       if (ret)
-               bn_check_top(ret);
+       bn_check_top(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);
-       if(dv) bn_check_top(dv);
-       if(rem) bn_check_top(rem);
+       bn_check_top(dv);
+       bn_check_top(rem);
        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) bn_check_top(rr);
-       if(tmp) bn_check_top(tmp);
+       bn_check_top(rr);
+       bn_check_top(tmp);
        BN_CTX_end(ctx);
        return(ret);
        }
index fa13a7cb0f185f2ccbd78c3db8a4e0933b9bd9bd..497298465127b8d9b0081e67a14204a13e4c8dc4 100644 (file)
@@ -75,6 +75,8 @@ static DSO_METHOD dso_meth_null = {
        NULL, /* unbind_func */
 #endif
        NULL, /* ctrl */
+       NULL, /* dso_name_converter */
+       NULL, /* dso_merger */
        NULL, /* init */
        NULL  /* finish */
        };
index 5390b9e5bd652be8ddd9c429934e78156ba130f7..9d469f1cfab47ab7e9c077270eaac32e25de6dd2 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;
-               if (!EC_GROUP_copy(tmp, group));
+               if (!EC_GROUP_copy(tmp, group)) ABORT;
                EC_GROUP_free(group);
                group = tmp;
        }
@@ -844,7 +844,7 @@ void char2_field_tests()
                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;
        }
index 5341daaf4eb7b2bb7cbdec185d7e36c34bb1d6be..7c139ae2efcb44754cb273cf2176b1763f71c5c8 100644 (file)
@@ -257,6 +257,7 @@ static const EVP_CIPHER test_r4_cipher=
        sizeof(TEST_RC4_KEY),
        NULL,
        NULL,
+       NULL,
        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,
+       NULL,
        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,
+       NULL,
        NULL
        };
 
index eadd8d42741e9c6c71fcea5b584d817d470f9154..67af850bea1ab955cdc3159bd57bb9f8a55c3b73 100644 (file)
@@ -90,6 +90,7 @@ static const EVP_CIPHER r4_cipher=
        sizeof(EVP_RC4_KEY),
        NULL,
        NULL,
+       NULL,
        NULL
        };
 
@@ -104,6 +105,7 @@ static const EVP_CIPHER r4_40_cipher=
        sizeof(EVP_RC4_KEY),
        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,
+       NULL,
        NULL
        };
 
index 998ac9935994b6da4715447629211b07352d7cd9..63b76bfef5fbe88c4ee418b6ff49403bb4830c39 100644 (file)
@@ -824,21 +824,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-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-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-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},
-{"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},
-{"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},
@@ -862,10 +862,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},
-{"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},
@@ -892,7 +892,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},
-{"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},
@@ -911,17 +911,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},
-{"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},
-{"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},
-{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},
@@ -929,23 +929,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},
-{"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},
-{"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},
-{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},
-{"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,
@@ -1009,7 +1009,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},
-{"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,
@@ -1330,7 +1330,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},
-{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},
@@ -1562,7 +1562,7 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
 {"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},
@@ -1821,16 +1821,16 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
        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},
 {"id-ppl","id-ppl",NID_id_ppl,7,&(lvalues[4463]),0},
@@ -1943,8 +1943,8 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
        &(lvalues[4995]),0},
 {"inhibitAnyPolicy","X509v3 Inhibit Any Policy",
        NID_inhibit_any_policy,3,&(lvalues[4998]),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},
 };
 
 static ASN1_OBJECT *sn_objs[NUM_SN]={
index d0371661f9739e4f764aca8deb46588d586d68ae..8a09a46ee659c62bea17e0f9aab426e658ed73ed 100644 (file)
@@ -94,7 +94,7 @@ for ($i=0; $i<$n; $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
                {
@@ -138,7 +138,7 @@ for ($i=0; $i<$n; $i++)
                        }
                else
                        {
-                       $out.="0,NULL";
+                       $out.="0,NULL,0";
                        }
                $out.="},\n";
                push(@out,$out);
index 14837a7a7d8766f15a06284d3e7352276361ae8a..5d031d93af9ec998a50c898e9c3eec984c4492eb 100644 (file)
@@ -155,7 +155,8 @@ int RAND_poll(void)
 #ifdef DEVRANDOM
        static const char *randomfiles[] = { DEVRANDOM };
        struct stat randomstats[sizeof(randomfiles)/sizeof(randomfiles[0])];
-       int fd,i;
+       int fd;
+       size_t i;
 #endif
 #ifdef DEVRANDOM_EGD
        static const char *egdsockets[] = { DEVRANDOM_EGD, NULL };
@@ -185,7 +186,8 @@ int RAND_poll(void)
                        {
                        struct timeval t = { 0, 10*1000 }; /* Spend 10ms on
                                                              each file. */
-                       int r,j;
+                       int r;
+                       size_t j;
                        fd_set fset;
                        struct stat *st=&randomstats[i];
 
index ef057c2c3132b9a2bb7d451598d94c2c7a989f50..9e92a70b033c032de9e23983f1a63b9fb59d11ce 100644 (file)
@@ -65,7 +65,7 @@
 /* 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;
index 49afa5c1dbfe820c3d8b843c4ea26d751d788b9a..54b597fa266e589cc7d8ad52d86d98031acc9158 100644 (file)
@@ -114,8 +114,8 @@ static unsigned char output[7][30]={
 
 int main(int argc, char *argv[])
        {
-       int i,err=0;
-       int j;
+       int err=0;
+       unsigned int i, j;
        unsigned char *p;
        RC4_KEY key;
        unsigned char obuf[512];
@@ -129,12 +129,12 @@ int main(int argc, char *argv[])
                        {
                        printf("error calculating RC4\n");
                        printf("output:");
-                       for (j=0; j<data_len[i]+1; j++)
+                       for (j=0; j<data_len[i]+1U; j++)
                                printf(" %02x",obuf[j]);
                        printf("\n");
                        printf("expect:");
                        p= &(output[i][0]);
-                       for (j=0; j<data_len[i]+1; j++)
+                       for (j=0; j<data_len[i]+1U; j++)
                                printf(" %02x",*(p++));
                        printf("\n");
                        err++;
@@ -180,12 +180,12 @@ int main(int argc, char *argv[])
                        {
                        printf("error in RC4 multi-call processing\n");
                        printf("output:");
-                       for (j=0; j<data_len[3]+1; j++)
+                       for (j=0; j<data_len[3]+1U; j++)
                                printf(" %02x",obuf[j]);
                        printf("\n");
                        printf("expect:");
                        p= &(output[3][0]);
-                       for (j=0; j<data_len[3]+1; j++)
+                       for (j=0; j<data_len[3]+1U; j++)
                                printf(" %02x",*(p++));
                        err++;
                        }
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 */
-       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);
index 3280c9d40c0c63b767fbb31bb457848ced23c664..e19d18c5b9376543c14c1b814f192966d7a55bd0 100644 (file)
@@ -64,7 +64,7 @@
 #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)
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 };
 
-int main ()
+int main (int argc,char **argv)
 { unsigned char md[SHA512_DIGEST_LENGTH];
   int          i;
   EVP_MD_CTX   evp;
index 2017e48c0e0e6b2d7c01e6297ae322d2e4c1573c..d5f1d4e05f86b9490ecb0307f545d8679026cd9e 100644 (file)
@@ -1062,7 +1062,7 @@ static int cswift_rand_bytes(unsigned char *buf, int num)
        /* limitation of cswift with values not a multiple of 32                */
        /************************************************************************/
 
-       while(num >= sizeof(buf32))
+       while(num >= (int)sizeof(buf32))
        {
                largenum.value = buf;
                largenum.nbytes = sizeof(buf32);
index 92661a9e3b0d531ad27700b72a64d58b1eade3c8..b746a50dd718d2a8104160ce2c25af3f877ff88b 100644 (file)
@@ -1229,7 +1229,7 @@ dtls1_min_mtu(void)
 static unsigned int 
 dtls1_guess_mtu(unsigned int curr_mtu)
        {
-       int i;
+       size_t i;
 
        if ( curr_mtu == 0 )
                return g_probable_mtu[0] ;
index 6d9b4cbbe03b4059cf6f34ca3f752f24c53f64e7..0ba06286687b9e5d48bcbd9502617b4d65271e87 100644 (file)
@@ -523,7 +523,7 @@ int dtls1_client_hello(SSL *s)
        {
        unsigned char *buf;
        unsigned char *p,*d;
-       int i,j;
+       unsigned int i,j;
        unsigned long Time,l;
        SSL_COMP *comp;
 
index 5efc16dda915b79fb512e1460e7cfbf37772a6ef..76c51691c39c3672baccc431660c5fd5e38a178c 100644 (file)
@@ -658,7 +658,8 @@ int dtls1_send_server_hello(SSL *s)
        {
        unsigned char *buf;
        unsigned char *p,*d;
-       int i,sl;
+       int i;
+       unsigned int sl;
        unsigned long l,Time;
 
        if (s->state == SSL3_ST_SW_SRVR_HELLO_A)
index f8c8e1d8ac565fac6f925cd8dc0c2fd9647b6af6..3df0f022d9263126ad554d8184d266dbb269c28f 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,
-       (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)