diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/ec/ec_ameth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c index aa18a68234..120d07548c 100644 --- a/src/lib/libcrypto/ec/ec_ameth.c +++ b/src/lib/libcrypto/ec/ec_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_ameth.c,v 1.59 2024/04/17 13:56:36 tb Exp $ */ | 1 | /* $OpenBSD: ec_ameth.c,v 1.60 2024/04/17 13:57:58 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -958,8 +958,6 @@ ecdh_cms_encrypt(CMS_RecipientInfo *ri) | |||
958 | if (EVP_PKEY_CTX_set_ecdh_kdf_type(pctx, EVP_PKEY_ECDH_KDF_X9_63) <= 0) | 958 | if (EVP_PKEY_CTX_set_ecdh_kdf_type(pctx, EVP_PKEY_ECDH_KDF_X9_63) <= 0) |
959 | goto err; | 959 | goto err; |
960 | 960 | ||
961 | if (!EVP_PKEY_CTX_get_ecdh_kdf_md(pctx, &kdf_md)) | ||
962 | goto err; | ||
963 | ecdh_nid = EVP_PKEY_CTX_get_ecdh_cofactor_mode(pctx); | 961 | ecdh_nid = EVP_PKEY_CTX_get_ecdh_cofactor_mode(pctx); |
964 | if (ecdh_nid < 0) | 962 | if (ecdh_nid < 0) |
965 | goto err; | 963 | goto err; |
@@ -968,6 +966,8 @@ ecdh_cms_encrypt(CMS_RecipientInfo *ri) | |||
968 | else if (ecdh_nid == 1) | 966 | else if (ecdh_nid == 1) |
969 | ecdh_nid = NID_dh_cofactor_kdf; | 967 | ecdh_nid = NID_dh_cofactor_kdf; |
970 | 968 | ||
969 | if (!EVP_PKEY_CTX_get_ecdh_kdf_md(pctx, &kdf_md)) | ||
970 | goto err; | ||
971 | if (kdf_md == NULL) { | 971 | if (kdf_md == NULL) { |
972 | /* Fixme later for better MD */ | 972 | /* Fixme later for better MD */ |
973 | kdf_md = EVP_sha1(); | 973 | kdf_md = EVP_sha1(); |