summaryrefslogtreecommitdiffstats
path: root/engines
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-06-15 17:25:15 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-06-15 17:25:15 +0000
commite97359435ee15e6d2c0580c76a58040e8dc3ce60 (patch)
tree01c3ecc781efc58b6efb927129cdfe511644a3d5 /engines
parentafce9bcca15bbf4a015d3f678cec5501ca1092eb (diff)
Fix warnings (From HEAD, original patch by Ben).
Diffstat (limited to 'engines')
-rw-r--r--engines/ccgost/gost_ameth.c4
-rw-r--r--engines/e_chil.c4
-rw-r--r--engines/e_cswift.c2
-rw-r--r--engines/e_ubsec.c2
4 files changed, 3 insertions, 9 deletions
diff --git a/engines/ccgost/gost_ameth.c b/engines/ccgost/gost_ameth.c
index f620a216c8..e6c2839e5f 100644
--- a/engines/ccgost/gost_ameth.c
+++ b/engines/ccgost/gost_ameth.c
@@ -39,7 +39,7 @@ static ASN1_STRING *encode_gost_algor_params(const EVP_PKEY *key)
ASN1_STRING *params = ASN1_STRING_new();
GOST_KEY_PARAMS *gkp = GOST_KEY_PARAMS_new();
int pkey_param_nid = NID_undef;
- int cipher_param_nid = NID_undef;
+
if (!params || !gkp)
{
GOSTerr(GOST_F_ENCODE_GOST_ALGOR_PARAMS,
@@ -52,7 +52,6 @@ static ASN1_STRING *encode_gost_algor_params(const EVP_PKEY *key)
{
case NID_id_GostR3410_2001:
pkey_param_nid = EC_GROUP_get_curve_name(EC_KEY_get0_group(EVP_PKEY_get0((EVP_PKEY *)key)));
- cipher_param_nid = get_encryption_params(NULL)->nid;
break;
case NID_id_GostR3410_94:
pkey_param_nid = (int) gost94_nid_by_params(EVP_PKEY_get0((EVP_PKEY *)key));
@@ -64,7 +63,6 @@ static ASN1_STRING *encode_gost_algor_params(const EVP_PKEY *key)
params=NULL;
goto err;
}
- cipher_param_nid = get_encryption_params(NULL)->nid;
break;
}
gkp->key_params = OBJ_nid2obj(pkey_param_nid);
diff --git a/engines/e_chil.c b/engines/e_chil.c
index 9c2729c96d..fdc2100e3d 100644
--- a/engines/e_chil.c
+++ b/engines/e_chil.c
@@ -1077,11 +1077,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 9b747b9aea..aa5709bd8c 100644
--- a/engines/e_ubsec.c
+++ b/engines/e_ubsec.c
@@ -630,10 +630,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. */