aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/providers/implementations/keymgmt/dh_kmgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/providers/implementations/keymgmt/dh_kmgmt.c')
-rw-r--r--crypto/openssl/providers/implementations/keymgmt/dh_kmgmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/openssl/providers/implementations/keymgmt/dh_kmgmt.c b/crypto/openssl/providers/implementations/keymgmt/dh_kmgmt.c
index 9a7dde7c6627..4ca9c1a3fad8 100644
--- a/crypto/openssl/providers/implementations/keymgmt/dh_kmgmt.c
+++ b/crypto/openssl/providers/implementations/keymgmt/dh_kmgmt.c
@@ -222,6 +222,9 @@ static int dh_export(void *keydata, int selection, OSSL_CALLBACK *param_cb,
if (!ossl_prov_is_running() || dh == NULL)
return 0;
+ if ((selection & DH_POSSIBLE_SELECTIONS) == 0)
+ return 0;
+
tmpl = OSSL_PARAM_BLD_new();
if (tmpl == NULL)
return 0;