From 140c1a485b4b84da360d1c59b4de8acaeff36216 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Mon, 18 Sep 2000 19:36:59 +0000 Subject: [PATCH] remove warnings --- lib/dns/sec/openssl/a_enum.c | 6 ++-- lib/dns/sec/openssl/a_int.c | 6 ++-- lib/dns/sec/openssl/obj_dat.h | 54 +++++++++++++++++----------------- lib/dns/sec/openssl/rsa_eay.c | 2 ++ lib/dns/sec/openssl/rsa_gen.c | 2 +- lib/dns/sec/openssl/rsa_none.c | 2 ++ 6 files changed, 38 insertions(+), 34 deletions(-) diff --git a/lib/dns/sec/openssl/a_enum.c b/lib/dns/sec/openssl/a_enum.c index 830b10833d..00c4406a5a 100644 --- a/lib/dns/sec/openssl/a_enum.c +++ b/lib/dns/sec/openssl/a_enum.c @@ -242,7 +242,7 @@ int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) long d; a->type=V_ASN1_ENUMERATED; - if (a->length < (sizeof(long)+1)) + if (a->length < (int)(sizeof(long)+1)) { if (a->data != NULL) Free(a->data); @@ -261,7 +261,7 @@ int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) a->type=V_ASN1_NEG_ENUMERATED; } - for (i=0; ilength > sizeof(long)) + if (a->length > (int)sizeof(long)) { /* hmm... a bit ugly */ return(0xffffffffL); diff --git a/lib/dns/sec/openssl/a_int.c b/lib/dns/sec/openssl/a_int.c index d762410406..5dc28ff8ea 100644 --- a/lib/dns/sec/openssl/a_int.c +++ b/lib/dns/sec/openssl/a_int.c @@ -340,7 +340,7 @@ int ASN1_INTEGER_set(ASN1_INTEGER *a, long v) long d; a->type=V_ASN1_INTEGER; - if (a->length < (sizeof(long)+1)) + if (a->length < (int)(sizeof(long)+1)) { if (a->data != NULL) Free(a->data); @@ -359,7 +359,7 @@ int ASN1_INTEGER_set(ASN1_INTEGER *a, long v) a->type=V_ASN1_NEG_INTEGER; } - for (i=0; ilength > sizeof(long)) + if (a->length > (int)sizeof(long)) { /* hmm... a bit ugly */ return(0xffffffffL); diff --git a/lib/dns/sec/openssl/obj_dat.h b/lib/dns/sec/openssl/obj_dat.h index d03460f845..95110a15dd 100644 --- a/lib/dns/sec/openssl/obj_dat.h +++ b/lib/dns/sec/openssl/obj_dat.h @@ -268,21 +268,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,5,&(lvalues[202]),0}, -{"DES-EDE3","des-ede3",NID_des_ede3,0,NULL}, +{"DES-EDE3","des-ede3",NID_des_ede3,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}, {"Email","emailAddress",NID_pkcs9_emailAddress,9,&(lvalues[257]),0}, {"unstructuredName","unstructuredName",NID_pkcs9_unstructuredName,9, @@ -305,10 +305,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}, @@ -335,7 +335,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}, {"ld-ce","ld-ce",NID_ld_ce,2,&(lvalues[489]),0}, {"subjectKeyIdentifier","X509v3 Subject Key Identifier", NID_subject_key_identifier,3,&(lvalues[491]),0}, @@ -354,13 +354,13 @@ 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}, {"G","givenName",NID_givenName,3,&(lvalues[535]),0}, {"S","surname",NID_surname,3,&(lvalues[538]),0}, {"I","initials",NID_initials,3,&(lvalues[541]),0}, @@ -372,23 +372,23 @@ static ASN1_OBJECT nid_objs[NUM_NID]={ {"T","title",NID_title,3,&(lvalues[558]),0}, {"D","description",NID_description,3,&(lvalues[561]),0}, {"CAST5-CBC","cast5-cbc",NID_cast5_cbc,9,&(lvalues[564]),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[573]),0}, {"DSA-SHA1","dsaWithSHA1",NID_dsaWithSHA1,7,&(lvalues[582]),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[589]),0}, {"DSA","dsaEncryption",NID_dsa,7,&(lvalues[594]),0}, {"RIPEMD160","ripemd160",NID_ripemd160,5,&(lvalues[601]),0}, -{NULL,NULL,NID_undef,0,NULL}, +{NULL,NULL,NID_undef,0,NULL,0}, {"RSA-RIPEMD160","ripemd160WithRSA",NID_ripemd160WithRSA,6, &(lvalues[606]),0}, {"RC5-CBC","rc5-cbc",NID_rc5_cbc,8,&(lvalues[612]),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[620]),0}, {"ZLIB","zlib compression",NID_zlib_compression,6,&(lvalues[626]),0}, {"extendedKeyUsage","X509v3 Extended Key Usage",NID_ext_key_usage,3, @@ -452,7 +452,7 @@ static ASN1_OBJECT nid_objs[NUM_NID]={ {"id-qt-cps","Policy Qualifier CPS",NID_id_qt_cps,8,&(lvalues[961]),0}, {"id-qt-unotice","Policy Qualifier User Notice",NID_id_qt_unotice,8, &(lvalues[969]),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[977]),0}, {"PBE-MD2-RC2-64","pbeWithMD2AndRC2-CBC",NID_pbeWithMD2AndRC2_CBC,9, diff --git a/lib/dns/sec/openssl/rsa_eay.c b/lib/dns/sec/openssl/rsa_eay.c index 2c75aca226..c2b81edbd4 100644 --- a/lib/dns/sec/openssl/rsa_eay.c +++ b/lib/dns/sec/openssl/rsa_eay.c @@ -90,6 +90,8 @@ static RSA_METHOD rsa_pkcs1_eay_meth={ RSA_eay_finish, 0, NULL, + NULL, + NULL }; RSA_METHOD *RSA_PKCS1_SSLeay(void) diff --git a/lib/dns/sec/openssl/rsa_gen.c b/lib/dns/sec/openssl/rsa_gen.c index 3114648eae..f790c27670 100644 --- a/lib/dns/sec/openssl/rsa_gen.c +++ b/lib/dns/sec/openssl/rsa_gen.c @@ -96,7 +96,7 @@ RSA *RSA_generate_key(int bits, unsigned long e_value, #if 1 /* The problem is when building with 8, 16, or 32 BN_ULONG, * unsigned long can be larger */ - for (i=0; ie,i); diff --git a/lib/dns/sec/openssl/rsa_none.c b/lib/dns/sec/openssl/rsa_none.c index 531b60424d..7c2b0284e0 100644 --- a/lib/dns/sec/openssl/rsa_none.c +++ b/lib/dns/sec/openssl/rsa_none.c @@ -88,6 +88,8 @@ int RSA_padding_check_none(unsigned char *to, int tlen, unsigned char *from, int flen, int num) { + (void)num; + if (flen > tlen) { RSAerr(RSA_F_RSA_PADDING_CHECK_NONE,RSA_R_DATA_TOO_LARGE);