summaryrefslogtreecommitdiffstats
path: root/crypto/dh
diff options
context:
space:
mode:
authorslontis <shane.lontis@oracle.com>2023-02-22 14:16:05 +1000
committerTomas Mraz <tomas@openssl.org>2023-04-03 10:31:04 +0200
commita76ccb9d0ddc24f6551afbc220b41fb3c4e64c6a (patch)
tree93935d36fb68f37c5f3ad61797ba69d6a0cc756a /crypto/dh
parenteb52450f5151e8e78743ab05de21a344823316f5 (diff)
FFC cleanups
Discovered during coverage testing. Remove unneccesary check when using ossl_dh_get0_params() and ossl_dsa_get0_params(). These point to addresses and can not fail for any existing calls. Make dsa keygen tests only available in the FIPS module - as they are not used in the default provider. Change ossl_ffc_set_digest() to return void as it cannot fail. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20359)
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh_backend.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/crypto/dh/dh_backend.c b/crypto/dh/dh_backend.c
index 726843fd30..abc66a5b30 100644
--- a/crypto/dh/dh_backend.c
+++ b/crypto/dh/dh_backend.c
@@ -31,13 +31,7 @@
static int dh_ffc_params_fromdata(DH *dh, const OSSL_PARAM params[])
{
int ret;
- FFC_PARAMS *ffc;
-
- if (dh == NULL)
- return 0;
- ffc = ossl_dh_get0_params(dh);
- if (ffc == NULL)
- return 0;
+ FFC_PARAMS *ffc = ossl_dh_get0_params(dh);
ret = ossl_ffc_params_fromdata(ffc, params);
if (ret)