aboutsummaryrefslogtreecommitdiffstats
path: root/engines
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-04-02 19:41:41 +0100
committerMatt Caswell <matt@openssl.org>2016-04-03 00:23:56 +0100
commita517f7fcdc85000b682b91d4cb2ab602f6f7d050 (patch)
tree39ecc74cc8fc7e97103ef787a0669f7ae219490a /engines
parenta60e6a7af4191be89e67b925c4ee35a1f7cdd1d0 (diff)
downloadopenssl-a517f7fcdc85000b682b91d4cb2ab602f6f7d050.tar.gz
Various DSA opacity fixups
Numerous fixups based on feedback of the DSA opacity changes. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'engines')
-rw-r--r--engines/e_capi.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/engines/e_capi.c b/engines/e_capi.c
index 0c7b68c949..4cec2f411c 100644
--- a/engines/e_capi.c
+++ b/engines/e_capi.c
@@ -476,12 +476,16 @@ static int capi_init(ENGINE *e)
/* Setup DSA Method */
dsa_capi_idx = DSA_get_ex_new_index(0, NULL, NULL, NULL, 0);
ossl_dsa_meth = DSA_OpenSSL();
- DSA_meth_set_sign(capi_dsa_method, capi_dsa_do_sign);
- DSA_meth_set_verify(capi_dsa_method, DSA_meth_get_verify(ossl_dsa_meth));
- DSA_meth_set_finish(capi_dsa_method, capi_dsa_free);
- DSA_meth_set_mod_exp(capi_dsa_method, DSA_meth_get_mod_exp(ossl_dsa_meth));
- DSA_meth_set_bn_mod_exp(capi_dsa_method,
- DSA_meth_get_bn_mod_exp(ossl_dsa_meth));
+ if ( !DSA_meth_set_sign(capi_dsa_method, capi_dsa_do_sign)
+ || !DSA_meth_set_verify(capi_dsa_method,
+ DSA_meth_get_verify(ossl_dsa_meth))
+ || !DSA_meth_set_finish(capi_dsa_method, capi_dsa_free)
+ || !DSA_meth_set_mod_exp(capi_dsa_method,
+ DSA_meth_get_mod_exp(ossl_dsa_meth))
+ || !DSA_meth_set_bn_mod_exp(capi_dsa_method,
+ DSA_meth_get_bn_mod_exp(ossl_dsa_meth))) {
+ goto memerr;
+ }
}
ctx = capi_ctx_new();