diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/ec/ec_ameth.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c index 120d07548c..e87cc1766c 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.60 2024/04/17 13:57:58 tb Exp $ */ | 1 | /* $OpenBSD: ec_ameth.c,v 1.61 2024/04/17 13:58:55 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,10 +958,9 @@ 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 | ecdh_nid = EVP_PKEY_CTX_get_ecdh_cofactor_mode(pctx); | 961 | if ((ecdh_nid = EVP_PKEY_CTX_get_ecdh_cofactor_mode(pctx)) < 0) |
962 | if (ecdh_nid < 0) | ||
963 | goto err; | 962 | goto err; |
964 | else if (ecdh_nid == 0) | 963 | if (ecdh_nid == 0) |
965 | ecdh_nid = NID_dh_std_kdf; | 964 | ecdh_nid = NID_dh_std_kdf; |
966 | else if (ecdh_nid == 1) | 965 | else if (ecdh_nid == 1) |
967 | ecdh_nid = NID_dh_cofactor_kdf; | 966 | ecdh_nid = NID_dh_cofactor_kdf; |