|
 |
c4366c |
diff -up openssl-fips-0.9.8e/apps/pkcs12.c.casts openssl-fips-0.9.8e/apps/pkcs12.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/apps/pkcs12.c.casts 2007-04-24 13:30:31.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/apps/pkcs12.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -484,7 +484,7 @@ int MAIN(int argc, char **argv)
|
|
 |
c4366c |
X509_keyid_set1(ucert, NULL, 0);
|
|
 |
c4366c |
X509_alias_set1(ucert, NULL, 0);
|
|
 |
c4366c |
/* Remove from list */
|
|
 |
c4366c |
- sk_X509_delete(certs, i);
|
|
 |
c4366c |
+ (void)sk_X509_delete(certs, i);
|
|
 |
c4366c |
break;
|
|
 |
c4366c |
}
|
|
 |
c4366c |
}
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/asn1/asn1.h.casts openssl-fips-0.9.8e/crypto/asn1/asn1.h
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/asn1/asn1.h.casts 2010-04-16 11:00:44.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/asn1/asn1.h 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -322,6 +322,17 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
|
|
 |
c4366c |
#define I2D_OF(type) int (*)(type *,unsigned char **)
|
|
 |
c4366c |
#define I2D_OF_const(type) int (*)(const type *,unsigned char **)
|
|
 |
c4366c |
|
|
 |
c4366c |
+#define CHECKED_D2I_OF(type, d2i) \
|
|
 |
c4366c |
+ ((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0)))
|
|
 |
c4366c |
+#define CHECKED_I2D_OF(type, i2d) \
|
|
 |
c4366c |
+ ((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0)))
|
|
 |
c4366c |
+#define CHECKED_NEW_OF(type, xnew) \
|
|
 |
c4366c |
+ ((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0)))
|
|
 |
c4366c |
+#define CHECKED_PTR_OF(type, p) \
|
|
 |
c4366c |
+ ((void*) (1 ? p : (type*)0))
|
|
 |
c4366c |
+#define CHECKED_PPTR_OF(type, p) \
|
|
 |
c4366c |
+ ((void**) (1 ? p : (type**)0))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long)
|
|
 |
c4366c |
#define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(type *,unsigned char **)
|
|
 |
c4366c |
#define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type)
|
|
 |
c4366c |
@@ -902,23 +913,41 @@ int ASN1_object_size(int constructed, in
|
|
 |
c4366c |
|
|
 |
c4366c |
/* Used to implement other functions */
|
|
 |
c4366c |
void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x);
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define ASN1_dup_of(type,i2d,d2i,x) \
|
|
 |
c4366c |
- ((type *(*)(I2D_OF(type),D2I_OF(type),type *))openssl_fcast(ASN1_dup))(i2d,d2i,x)
|
|
 |
c4366c |
+ ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
|
|
 |
c4366c |
+ CHECKED_D2I_OF(type, d2i), \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(type, x)))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define ASN1_dup_of_const(type,i2d,d2i,x) \
|
|
 |
c4366c |
- ((type *(*)(I2D_OF_const(type),D2I_OF(type),type *))openssl_fcast(ASN1_dup))(i2d,d2i,x)
|
|
 |
c4366c |
+ ((type*)ASN1_dup(CHECKED_I2D_OF(const type, i2d), \
|
|
 |
c4366c |
+ CHECKED_D2I_OF(type, d2i), \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(const type, x)))
|
|
 |
c4366c |
|
|
 |
c4366c |
void *ASN1_item_dup(const ASN1_ITEM *it, void *x);
|
|
 |
c4366c |
|
|
 |
c4366c |
#ifndef OPENSSL_NO_FP_API
|
|
 |
c4366c |
void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x);
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \
|
|
 |
c4366c |
- ((type *(*)(type *(*)(void),D2I_OF(type),FILE *,type **))openssl_fcast(ASN1_d2i_fp))(xnew,d2i,in,x)
|
|
 |
c4366c |
+ ((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \
|
|
 |
c4366c |
+ CHECKED_D2I_OF(type, d2i), \
|
|
 |
c4366c |
+ in, \
|
|
 |
c4366c |
+ CHECKED_PPTR_OF(type, x)))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
|
|
 |
c4366c |
int ASN1_i2d_fp(i2d_of_void *i2d,FILE *out,void *x);
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define ASN1_i2d_fp_of(type,i2d,out,x) \
|
|
 |
c4366c |
- ((int (*)(I2D_OF(type),FILE *,type *))openssl_fcast(ASN1_i2d_fp))(i2d,out,x)
|
|
 |
c4366c |
+ (ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \
|
|
 |
c4366c |
+ out, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(type, x)))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define ASN1_i2d_fp_of_const(type,i2d,out,x) \
|
|
 |
c4366c |
- ((int (*)(I2D_OF_const(type),FILE *,type *))openssl_fcast(ASN1_i2d_fp))(i2d,out,x)
|
|
 |
c4366c |
+ (ASN1_i2d_fp(CHECKED_I2D_OF(const type, i2d), \
|
|
 |
c4366c |
+ out, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(const type, x)))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);
|
|
 |
c4366c |
int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
|
|
 |
c4366c |
#endif
|
|
 |
c4366c |
@@ -927,14 +956,26 @@ int ASN1_STRING_to_UTF8(unsigned char **
|
|
 |
c4366c |
|
|
 |
c4366c |
#ifndef OPENSSL_NO_BIO
|
|
 |
c4366c |
void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x);
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \
|
|
 |
c4366c |
- ((type *(*)(type *(*)(void),D2I_OF(type),BIO *,type **))openssl_fcast(ASN1_d2i_bio))(xnew,d2i,in,x)
|
|
 |
c4366c |
+ ((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \
|
|
 |
c4366c |
+ CHECKED_D2I_OF(type, d2i), \
|
|
 |
c4366c |
+ in, \
|
|
 |
c4366c |
+ CHECKED_PPTR_OF(type, x)))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);
|
|
 |
c4366c |
int ASN1_i2d_bio(i2d_of_void *i2d,BIO *out, unsigned char *x);
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define ASN1_i2d_bio_of(type,i2d,out,x) \
|
|
 |
c4366c |
- ((int (*)(I2D_OF(type),BIO *,type *))openssl_fcast(ASN1_i2d_bio))(i2d,out,x)
|
|
 |
c4366c |
+ (ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \
|
|
 |
c4366c |
+ out, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(type, x)))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define ASN1_i2d_bio_of_const(type,i2d,out,x) \
|
|
 |
c4366c |
- ((int (*)(I2D_OF_const(type),BIO *,const type *))openssl_fcast(ASN1_i2d_bio))(i2d,out,x)
|
|
 |
c4366c |
+ (ASN1_i2d_bio(CHECKED_I2D_OF(const type, i2d), \
|
|
 |
c4366c |
+ out, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(const type, x)))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);
|
|
 |
c4366c |
int ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a);
|
|
 |
c4366c |
int ASN1_GENERALIZEDTIME_print(BIO *fp,ASN1_GENERALIZEDTIME *a);
|
|
 |
c4366c |
@@ -977,8 +1018,12 @@ void *ASN1_unpack_string(ASN1_STRING *oc
|
|
 |
c4366c |
void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
|
|
 |
c4366c |
ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,
|
|
 |
c4366c |
ASN1_OCTET_STRING **oct);
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define ASN1_pack_string_of(type,obj,i2d,oct) \
|
|
 |
c4366c |
- ((ASN1_STRING *(*)(type *,I2D_OF(type),ASN1_OCTET_STRING **))openssl_fcast(ASN1_pack_string))(obj,i2d,oct)
|
|
 |
c4366c |
+ (ASN1_pack_string(CHECKED_PTR_OF(type, obj), \
|
|
 |
c4366c |
+ CHECKED_I2D_OF(type, i2d), \
|
|
 |
c4366c |
+ oct))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct);
|
|
 |
c4366c |
|
|
 |
c4366c |
void ASN1_STRING_set_default_mask(unsigned long mask);
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/asn1/tasn_dec.c.casts openssl-fips-0.9.8e/crypto/asn1/tasn_dec.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/asn1/tasn_dec.c.casts 2010-04-16 11:00:44.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/asn1/tasn_dec.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -130,7 +130,7 @@ ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **p
|
|
 |
c4366c |
ASN1_VALUE *ptmpval = NULL;
|
|
 |
c4366c |
if (!pval)
|
|
 |
c4366c |
pval = &ptmpval;
|
|
 |
c4366c |
- asn1_tlc_clear(&c);
|
|
 |
c4366c |
+ c.valid = 0;
|
|
 |
c4366c |
if (ASN1_item_ex_d2i(pval, in, len, it, -1, 0, 0, &c) > 0)
|
|
 |
c4366c |
return *pval;
|
|
 |
c4366c |
return NULL;
|
|
 |
c4366c |
@@ -140,7 +140,7 @@ int ASN1_template_d2i(ASN1_VALUE **pval,
|
|
 |
c4366c |
const unsigned char **in, long len, const ASN1_TEMPLATE *tt)
|
|
 |
c4366c |
{
|
|
 |
c4366c |
ASN1_TLC c;
|
|
 |
c4366c |
- asn1_tlc_clear(&c);
|
|
 |
c4366c |
+ c.valid = 0;
|
|
 |
c4366c |
return asn1_template_ex_d2i(pval, in, len, tt, 0, &c);
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/asn1/tasn_enc.c.casts openssl-fips-0.9.8e/crypto/asn1/tasn_enc.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/asn1/tasn_enc.c.casts 2006-01-19 18:17:33.000000000 +0100
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/asn1/tasn_enc.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -494,7 +494,7 @@ static int asn1_set_seq_out(STACK_OF(ASN
|
|
 |
c4366c |
{
|
|
 |
c4366c |
for (i = 0, tder = derlst; i < sk_ASN1_VALUE_num(sk);
|
|
 |
c4366c |
i++, tder++)
|
|
 |
c4366c |
- sk_ASN1_VALUE_set(sk, i, tder->field);
|
|
 |
c4366c |
+ (void)sk_ASN1_VALUE_set(sk, i, tder->field);
|
|
 |
c4366c |
}
|
|
 |
c4366c |
OPENSSL_free(derlst);
|
|
 |
c4366c |
OPENSSL_free(tmpdat);
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/asn1/x_crl.c.casts openssl-fips-0.9.8e/crypto/asn1/x_crl.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/asn1/x_crl.c.casts 2004-12-09 14:35:05.000000000 +0100
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/asn1/x_crl.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -84,7 +84,7 @@ static int crl_inf_cb(int operation, ASN
|
|
 |
c4366c |
* would affect the output of X509_CRL_print().
|
|
 |
c4366c |
*/
|
|
 |
c4366c |
case ASN1_OP_D2I_POST:
|
|
 |
c4366c |
- sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_cmp);
|
|
 |
c4366c |
+ (void)sk_X509_REVOKED_set_cmp_func(a->revoked,X509_REVOKED_cmp);
|
|
 |
c4366c |
break;
|
|
 |
c4366c |
}
|
|
 |
c4366c |
return 1;
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/conf/conf_api.c.casts openssl-fips-0.9.8e/crypto/conf/conf_api.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/conf/conf_api.c.casts 2002-01-18 17:50:42.000000000 +0100
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/conf/conf_api.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -121,7 +121,7 @@ int _CONF_add_string(CONF *conf, CONF_VA
|
|
 |
c4366c |
v = (CONF_VALUE *)lh_insert(conf->data, value);
|
|
 |
c4366c |
if (v != NULL)
|
|
 |
c4366c |
{
|
|
 |
c4366c |
- sk_CONF_VALUE_delete_ptr(ts,v);
|
|
 |
c4366c |
+ (void)sk_CONF_VALUE_delete_ptr(ts,v);
|
|
 |
c4366c |
OPENSSL_free(v->name);
|
|
 |
c4366c |
OPENSSL_free(v->value);
|
|
 |
c4366c |
OPENSSL_free(v);
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/conf/conf_mod.c.casts openssl-fips-0.9.8e/crypto/conf/conf_mod.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/conf/conf_mod.c.casts 2007-04-09 13:47:59.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/conf/conf_mod.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -432,7 +432,7 @@ void CONF_modules_unload(int all)
|
|
 |
c4366c |
if (((md->links > 0) || !md->dso) && !all)
|
|
 |
c4366c |
continue;
|
|
 |
c4366c |
/* Since we're working in reverse this is OK */
|
|
 |
c4366c |
- sk_CONF_MODULE_delete(supported_modules, i);
|
|
 |
c4366c |
+ (void)sk_CONF_MODULE_delete(supported_modules, i);
|
|
 |
c4366c |
module_free(md);
|
|
 |
c4366c |
}
|
|
 |
c4366c |
if (sk_CONF_MODULE_num(supported_modules) == 0)
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/engine/eng_table.c.casts openssl-fips-0.9.8e/crypto/engine/eng_table.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/engine/eng_table.c.casts 2004-06-19 05:58:42.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/engine/eng_table.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -147,7 +147,7 @@ int engine_table_register(ENGINE_TABLE *
|
|
 |
c4366c |
lh_insert(&(*table)->piles, fnd);
|
|
 |
c4366c |
}
|
|
 |
c4366c |
/* A registration shouldn't add duplciate entries */
|
|
 |
c4366c |
- sk_ENGINE_delete_ptr(fnd->sk, e);
|
|
 |
c4366c |
+ (void)sk_ENGINE_delete_ptr(fnd->sk, e);
|
|
 |
c4366c |
/* if 'setdefault', this ENGINE goes to the head of the list */
|
|
 |
c4366c |
if(!sk_ENGINE_push(fnd->sk, e))
|
|
 |
c4366c |
goto end;
|
|
 |
c4366c |
@@ -178,7 +178,7 @@ static void int_unregister_cb(ENGINE_PIL
|
|
 |
c4366c |
/* Iterate the 'c->sk' stack removing any occurance of 'e' */
|
|
 |
c4366c |
while((n = sk_ENGINE_find(pile->sk, e)) >= 0)
|
|
 |
c4366c |
{
|
|
 |
c4366c |
- sk_ENGINE_delete(pile->sk, n);
|
|
 |
c4366c |
+ (void)sk_ENGINE_delete(pile->sk, n);
|
|
 |
c4366c |
/* "touch" this ENGINE_CIPHER */
|
|
 |
c4366c |
pile->uptodate = 1;
|
|
 |
c4366c |
}
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/ex_data.c.casts openssl-fips-0.9.8e/crypto/ex_data.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/ex_data.c.casts 2004-04-19 20:09:22.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/ex_data.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -354,7 +354,7 @@ static int def_add_index(EX_CLASS_ITEM *
|
|
 |
c4366c |
}
|
|
 |
c4366c |
}
|
|
 |
c4366c |
toret = item->meth_num++;
|
|
 |
c4366c |
- sk_CRYPTO_EX_DATA_FUNCS_set(item->meth, toret, a);
|
|
 |
c4366c |
+ (void)sk_CRYPTO_EX_DATA_FUNCS_set(item->meth, toret, a);
|
|
 |
c4366c |
err:
|
|
 |
c4366c |
CRYPTO_w_unlock(CRYPTO_LOCK_EX_DATA);
|
|
 |
c4366c |
return toret;
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/ocsp/ocsp.h.casts openssl-fips-0.9.8e/crypto/ocsp/ocsp.h
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/ocsp/ocsp.h.casts 2010-04-16 11:00:43.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/ocsp/ocsp.h 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -469,7 +469,7 @@ int OCSP_basic_sign(OCSP_BASICRESP *brsp
|
|
 |
c4366c |
ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d,
|
|
 |
c4366c |
void *data, STACK_OF(ASN1_OBJECT) *sk);
|
|
 |
c4366c |
#define ASN1_STRING_encode_of(type,s,i2d,data,sk) \
|
|
 |
c4366c |
-((ASN1_STRING *(*)(ASN1_STRING *,I2D_OF(type),type *,STACK_OF(ASN1_OBJECT) *))openssl_fcast(ASN1_STRING_encode))(s,i2d,data,sk)
|
|
 |
c4366c |
+ ASN1_STRING_encode(s, CHECKED_I2D_OF(type, i2d), data, sk)
|
|
 |
c4366c |
|
|
 |
c4366c |
X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim);
|
|
 |
c4366c |
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/pem/pem.h.casts openssl-fips-0.9.8e/crypto/pem/pem.h
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/pem/pem.h.casts 2010-04-16 11:00:43.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/pem/pem.h 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -220,19 +220,28 @@ typedef struct pem_ctx_st
|
|
 |
c4366c |
#define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \
|
|
 |
c4366c |
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
-return(((type *(*)(D2I_OF(type),char *,FILE *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read))(d2i_##asn1, str,fp,x,cb,u)); \
|
|
 |
c4366c |
+ return (type*)PEM_ASN1_read(CHECKED_D2I_OF(type, d2i_##asn1), \
|
|
 |
c4366c |
+ str, fp, \
|
|
 |
c4366c |
+ CHECKED_PPTR_OF(type, x), \
|
|
 |
c4366c |
+ cb, u); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \
|
|
 |
c4366c |
int PEM_write_##name(FILE *fp, type *x) \
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
-return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \
|
|
 |
c4366c |
+ return PEM_ASN1_write(CHECKED_I2D_OF(type, i2d_##asn1), \
|
|
 |
c4366c |
+ str, fp, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(type, x), \
|
|
 |
c4366c |
+ NULL, NULL, 0, NULL, NULL); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \
|
|
 |
c4366c |
int PEM_write_##name(FILE *fp, const type *x) \
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
-return(((int (*)(I2D_OF_const(type),const char *,FILE *, const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \
|
|
 |
c4366c |
+ return PEM_ASN1_write(CHECKED_I2D_OF(const type, i2d_##asn1), \
|
|
 |
c4366c |
+ str, fp, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(const type, x), \
|
|
 |
c4366c |
+ NULL, NULL, 0, NULL, NULL); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \
|
|
 |
c4366c |
@@ -240,7 +249,10 @@ int PEM_write_##name(FILE *fp, type *x,
|
|
 |
c4366c |
unsigned char *kstr, int klen, pem_password_cb *cb, \
|
|
 |
c4366c |
void *u) \
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
- return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \
|
|
 |
c4366c |
+ return PEM_ASN1_write(CHECKED_I2D_OF(type, i2d_##asn1), \
|
|
 |
c4366c |
+ str, fp, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(type, x), \
|
|
 |
c4366c |
+ enc, kstr, klen, cb, u); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \
|
|
 |
c4366c |
@@ -248,7 +260,10 @@ int PEM_write_##name(FILE *fp, type *x,
|
|
 |
c4366c |
unsigned char *kstr, int klen, pem_password_cb *cb, \
|
|
 |
c4366c |
void *u) \
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
- return(((int (*)(I2D_OF_const(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \
|
|
 |
c4366c |
+ return PEM_ASN1_write(CHECKED_I2D_OF(const type, i2d_##asn1), \
|
|
 |
c4366c |
+ str, fp, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(const type, x), \
|
|
 |
c4366c |
+ enc, kstr, klen, cb, u); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#endif
|
|
 |
c4366c |
@@ -256,33 +271,48 @@ int PEM_write_##name(FILE *fp, type *x,
|
|
 |
c4366c |
#define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
|
|
 |
c4366c |
type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
-return(((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read_bio))(d2i_##asn1, str,bp,x,cb,u)); \
|
|
 |
c4366c |
+ return (type*)PEM_ASN1_read_bio(CHECKED_D2I_OF(type, d2i_##asn1), \
|
|
 |
c4366c |
+ str, bp, \
|
|
 |
c4366c |
+ CHECKED_PPTR_OF(type, x), \
|
|
 |
c4366c |
+ cb, u); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \
|
|
 |
c4366c |
int PEM_write_bio_##name(BIO *bp, type *x) \
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
-return(((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \
|
|
 |
c4366c |
+ return PEM_ASN1_write_bio(CHECKED_I2D_OF(type, i2d_##asn1), \
|
|
 |
c4366c |
+ str, bp, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(type, x), \
|
|
 |
c4366c |
+ NULL, NULL, 0, NULL, NULL); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
|
|
 |
c4366c |
int PEM_write_bio_##name(BIO *bp, const type *x) \
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
-return(((int (*)(I2D_OF_const(type),const char *,BIO *,const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \
|
|
 |
c4366c |
+ return PEM_ASN1_write_bio(CHECKED_I2D_OF(const type, i2d_##asn1), \
|
|
 |
c4366c |
+ str, bp, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(const type, x), \
|
|
 |
c4366c |
+ NULL, NULL, 0, NULL, NULL); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \
|
|
 |
c4366c |
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
|
|
 |
c4366c |
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
- return(((int (*)(I2D_OF(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \
|
|
 |
c4366c |
+ return PEM_ASN1_write_bio(CHECKED_I2D_OF(type, i2d_##asn1), \
|
|
 |
c4366c |
+ str, bp, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(type, x), \
|
|
 |
c4366c |
+ enc, kstr, klen, cb, u); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \
|
|
 |
c4366c |
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
|
|
 |
c4366c |
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \
|
|
 |
c4366c |
{ \
|
|
 |
c4366c |
- return(((int (*)(I2D_OF_const(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \
|
|
 |
c4366c |
+ return PEM_ASN1_write_bio(CHECKED_I2D_OF(const type, i2d_##asn1), \
|
|
 |
c4366c |
+ str, bp, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(const type, x), \
|
|
 |
c4366c |
+ enc, kstr, klen, cb, u); \
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
#define IMPLEMENT_PEM_write(name, type, str, asn1) \
|
|
 |
c4366c |
@@ -545,13 +575,22 @@ int PEM_bytes_read_bio(unsigned char **p
|
|
 |
c4366c |
pem_password_cb *cb, void *u);
|
|
 |
c4366c |
void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp,
|
|
 |
c4366c |
void **x, pem_password_cb *cb, void *u);
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define PEM_ASN1_read_bio_of(type,d2i,name,bp,x,cb,u) \
|
|
 |
c4366c |
-((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read_bio))(d2i,name,bp,x,cb,u)
|
|
 |
c4366c |
+ ((type*)PEM_ASN1_read_bio(CHECKED_D2I_OF(type, d2i), \
|
|
 |
c4366c |
+ name, bp, \
|
|
 |
c4366c |
+ CHECKED_PPTR_OF(type, x), \
|
|
 |
c4366c |
+ cb, u))
|
|
 |
c4366c |
+
|
|
 |
c4366c |
int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp,char *x,
|
|
 |
c4366c |
const EVP_CIPHER *enc,unsigned char *kstr,int klen,
|
|
 |
c4366c |
pem_password_cb *cb, void *u);
|
|
 |
c4366c |
+
|
|
 |
c4366c |
#define PEM_ASN1_write_bio_of(type,i2d,name,bp,x,enc,kstr,klen,cb,u) \
|
|
 |
c4366c |
- ((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d,name,bp,x,enc,kstr,klen,cb,u)
|
|
 |
c4366c |
+ (PEM_ASN1_write_bio(CHECKED_I2D_OF(type, i2d), \
|
|
 |
c4366c |
+ name, bp, \
|
|
 |
c4366c |
+ CHECKED_PTR_OF(type, x), \
|
|
 |
c4366c |
+ enc, kstr, klen, cb, u))
|
|
 |
c4366c |
|
|
 |
c4366c |
STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u);
|
|
 |
c4366c |
int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc,
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/x509v3/pcy_tree.c.casts openssl-fips-0.9.8e/crypto/x509v3/pcy_tree.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/x509v3/pcy_tree.c.casts 2006-11-27 14:36:54.000000000 +0100
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/x509v3/pcy_tree.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -345,7 +345,7 @@ static int tree_prune(X509_POLICY_TREE *
|
|
 |
c4366c |
{
|
|
 |
c4366c |
node->parent->nchild--;
|
|
 |
c4366c |
OPENSSL_free(node);
|
|
 |
c4366c |
- sk_X509_POLICY_NODE_delete(curr->nodes, i);
|
|
 |
c4366c |
+ (void)sk_X509_POLICY_NODE_delete(curr->nodes, i);
|
|
 |
c4366c |
}
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
@@ -358,7 +358,7 @@ static int tree_prune(X509_POLICY_TREE *
|
|
 |
c4366c |
{
|
|
 |
c4366c |
node->parent->nchild--;
|
|
 |
c4366c |
OPENSSL_free(node);
|
|
 |
c4366c |
- sk_X509_POLICY_NODE_delete(curr->nodes, i);
|
|
 |
c4366c |
+ (void)sk_X509_POLICY_NODE_delete(curr->nodes, i);
|
|
 |
c4366c |
}
|
|
 |
c4366c |
}
|
|
 |
c4366c |
if (curr->anyPolicy && !curr->anyPolicy->nchild)
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/x509/x509_vfy.c.casts openssl-fips-0.9.8e/crypto/x509/x509_vfy.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/x509/x509_vfy.c.casts 2010-04-16 11:00:44.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/x509/x509_vfy.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -164,7 +164,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx
|
|
 |
c4366c |
goto end;
|
|
 |
c4366c |
}
|
|
 |
c4366c |
CRYPTO_add(&xtmp->references,1,CRYPTO_LOCK_X509);
|
|
 |
c4366c |
- sk_X509_delete_ptr(sktmp,xtmp);
|
|
 |
c4366c |
+ (void)sk_X509_delete_ptr(sktmp,xtmp);
|
|
 |
c4366c |
ctx->last_untrusted++;
|
|
 |
c4366c |
x=xtmp;
|
|
 |
c4366c |
num++;
|
|
 |
c4366c |
@@ -214,7 +214,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx
|
|
 |
c4366c |
*/
|
|
 |
c4366c |
X509_free(x);
|
|
 |
c4366c |
x = xtmp;
|
|
 |
c4366c |
- sk_X509_set(ctx->chain, i - 1, x);
|
|
 |
c4366c |
+ (void)sk_X509_set(ctx->chain, i - 1, x);
|
|
 |
c4366c |
ctx->last_untrusted=0;
|
|
 |
c4366c |
}
|
|
 |
c4366c |
}
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/crypto/x509/x509_vpm.c.casts openssl-fips-0.9.8e/crypto/x509/x509_vpm.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/crypto/x509/x509_vpm.c.casts 2006-05-03 15:16:02.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/crypto/x509/x509_vpm.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -385,7 +385,7 @@ int X509_VERIFY_PARAM_add0_table(X509_VE
|
|
 |
c4366c |
{
|
|
 |
c4366c |
ptmp = sk_X509_VERIFY_PARAM_value(param_table, idx);
|
|
 |
c4366c |
X509_VERIFY_PARAM_free(ptmp);
|
|
 |
c4366c |
- sk_X509_VERIFY_PARAM_delete(param_table, idx);
|
|
 |
c4366c |
+ (void)sk_X509_VERIFY_PARAM_delete(param_table, idx);
|
|
 |
c4366c |
}
|
|
 |
c4366c |
}
|
|
 |
c4366c |
if (!sk_X509_VERIFY_PARAM_push(param_table, param))
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/engines/e_ubsec.c.casts openssl-fips-0.9.8e/engines/e_ubsec.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/engines/e_ubsec.c.casts 2010-04-16 11:00:44.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/engines/e_ubsec.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -822,11 +822,11 @@ static int ubsec_dsa_verify(const unsign
|
|
 |
c4366c |
int v_len, d_len;
|
|
 |
c4366c |
int to_return = 0;
|
|
 |
c4366c |
int fd;
|
|
 |
c4366c |
- BIGNUM v;
|
|
 |
c4366c |
+ BIGNUM v, *pv = &v;
|
|
 |
c4366c |
|
|
 |
c4366c |
BN_init(&v);
|
|
 |
c4366c |
|
|
 |
c4366c |
- if(!bn_wexpand(&v, dsa->p->top)) {
|
|
 |
c4366c |
+ if(!bn_wexpand(pv, dsa->p->top)) {
|
|
 |
c4366c |
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY, UBSEC_R_BN_EXPAND_FAIL);
|
|
 |
c4366c |
goto err;
|
|
 |
c4366c |
}
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/ssl/ssl_cert.c.casts openssl-fips-0.9.8e/ssl/ssl_cert.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/ssl/ssl_cert.c.casts 2006-06-14 10:51:41.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/ssl/ssl_cert.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -762,7 +762,7 @@ err:
|
|
 |
c4366c |
if(x != NULL)
|
|
 |
c4366c |
X509_free(x);
|
|
 |
c4366c |
|
|
 |
c4366c |
- sk_X509_NAME_set_cmp_func(stack,oldcmp);
|
|
 |
c4366c |
+ (void)sk_X509_NAME_set_cmp_func(stack,oldcmp);
|
|
 |
c4366c |
|
|
 |
c4366c |
return ret;
|
|
 |
c4366c |
}
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/ssl/s2_clnt.c.casts openssl-fips-0.9.8e/ssl/s2_clnt.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/ssl/s2_clnt.c.casts 2010-04-16 11:00:44.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/ssl/s2_clnt.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -466,11 +466,11 @@ static int get_server_hello(SSL *s)
|
|
 |
c4366c |
return(-1);
|
|
 |
c4366c |
}
|
|
 |
c4366c |
|
|
 |
c4366c |
- sk_SSL_CIPHER_set_cmp_func(sk,ssl_cipher_ptr_id_cmp);
|
|
 |
c4366c |
+ (void)sk_SSL_CIPHER_set_cmp_func(sk,ssl_cipher_ptr_id_cmp);
|
|
 |
c4366c |
|
|
 |
c4366c |
/* get the array of ciphers we will accept */
|
|
 |
c4366c |
cl=SSL_get_ciphers(s);
|
|
 |
c4366c |
- sk_SSL_CIPHER_set_cmp_func(cl,ssl_cipher_ptr_id_cmp);
|
|
 |
c4366c |
+ (void)sk_SSL_CIPHER_set_cmp_func(cl,ssl_cipher_ptr_id_cmp);
|
|
 |
c4366c |
|
|
 |
c4366c |
/*
|
|
 |
c4366c |
* If server preference flag set, choose the first
|
|
 |
c4366c |
diff -up openssl-fips-0.9.8e/ssl/s2_srvr.c.casts openssl-fips-0.9.8e/ssl/s2_srvr.c
|
|
 |
c4366c |
--- openssl-fips-0.9.8e/ssl/s2_srvr.c.casts 2010-04-16 11:00:44.000000000 +0200
|
|
 |
c4366c |
+++ openssl-fips-0.9.8e/ssl/s2_srvr.c 2010-04-16 16:02:13.000000000 +0200
|
|
 |
c4366c |
@@ -657,7 +657,7 @@ static int get_client_hello(SSL *s)
|
|
 |
c4366c |
{
|
|
 |
c4366c |
if (sk_SSL_CIPHER_find(allow,sk_SSL_CIPHER_value(prio,z)) < 0)
|
|
 |
c4366c |
{
|
|
 |
c4366c |
- sk_SSL_CIPHER_delete(prio,z);
|
|
 |
c4366c |
+ (void)sk_SSL_CIPHER_delete(prio,z);
|
|
 |
c4366c |
z--;
|
|
 |
c4366c |
}
|
|
 |
c4366c |
}
|