diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-02 20:41:41 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-03 01:23:56 +0200 |
commit | a517f7fcdc85000b682b91d4cb2ab602f6f7d050 (patch) | |
tree | 39ecc74cc8fc7e97103ef787a0669f7ae219490a /engines/e_capi.c | |
parent | make update (diff) | |
download | openssl-a517f7fcdc85000b682b91d4cb2ab602f6f7d050.tar.xz openssl-a517f7fcdc85000b682b91d4cb2ab602f6f7d050.zip |
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/e_capi.c')
-rw-r--r-- | engines/e_capi.c | 16 |
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(); |