fix warnings when building openssl with (gcc 3.3.1):
-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
This commit is contained in:
parent
801136bcc2
commit
7f622f6c04
27 changed files with 98 additions and 82 deletions
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -76,6 +76,7 @@ static const EVP_CIPHER n_cipher=
|
|||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -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]={
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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] ;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue