From d886975835e7e430aeda6ecb1653363b463bc9cf Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sat, 12 Jun 2010 13:18:58 +0000 Subject: Fix gcc 4.6 warnings. Check TLS server hello extension length. --- engines/e_chil.c | 4 ++-- engines/e_cswift.c | 2 -- engines/e_ubsec.c | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/e_chil.c b/engines/e_chil.c index ab8a25962c..fca7a9cea6 100644 --- a/engines/e_chil.c +++ b/engines/e_chil.c @@ -1080,11 +1080,11 @@ static int hwcrhk_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, static int hwcrhk_rsa_finish(RSA *rsa) { HWCryptoHook_RSAKeyHandle *hptr; - int ret; + hptr = RSA_get_ex_data(rsa, hndidx_rsa); if (hptr) { - ret = p_hwcrhk_RSAUnloadKey(*hptr, NULL); + p_hwcrhk_RSAUnloadKey(*hptr, NULL); OPENSSL_free(hptr); RSA_set_ex_data(rsa, hndidx_rsa, NULL); } diff --git a/engines/e_cswift.c b/engines/e_cswift.c index bc65179846..2e64ff3277 100644 --- a/engines/e_cswift.c +++ b/engines/e_cswift.c @@ -811,7 +811,6 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) SW_PARAM sw_param; SW_STATUS sw_status; SW_LARGENUMBER arg, res; - unsigned char *ptr; BN_CTX *ctx; BIGNUM *dsa_p = NULL; BIGNUM *dsa_q = NULL; @@ -899,7 +898,6 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) goto err; } /* Convert the response */ - ptr = (unsigned char *)result->d; if((to_return = DSA_SIG_new()) == NULL) goto err; to_return->r = BN_bin2bn((unsigned char *)result->d, 20, NULL); diff --git a/engines/e_ubsec.c b/engines/e_ubsec.c index a0f320caf5..f1c81013b1 100644 --- a/engines/e_ubsec.c +++ b/engines/e_ubsec.c @@ -631,10 +631,8 @@ static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *dq, const BIGNUM *qinv, BN_CTX *ctx) { int y_len, - m_len, fd; - m_len = BN_num_bytes(p) + BN_num_bytes(q) + 1; y_len = BN_num_bits(p) + BN_num_bits(q); /* Check if hardware can't handle this argument. */ -- cgit v1.2.3