diff options
-rw-r--r-- | src/lib/libcrypto/ec/ec_ameth.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c index 3848c12147..155c1855b4 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.62 2024/04/17 14:00:17 tb Exp $ */ | 1 | /* $OpenBSD: ec_ameth.c,v 1.63 2024/04/17 14:01:33 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 | */ |
@@ -1006,13 +1006,11 @@ ecdh_cms_encrypt(CMS_RecipientInfo *ri) | |||
1006 | wrap_alg->parameter = NULL; | 1006 | wrap_alg->parameter = NULL; |
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | if (EVP_PKEY_CTX_set_ecdh_kdf_outlen(pctx, keylen) <= 0) | 1009 | if ((penclen = CMS_SharedInfo_encode(&penc, wrap_alg, ukm, keylen)) <= 0) |
1010 | goto err; | 1010 | goto err; |
1011 | 1011 | ||
1012 | penclen = CMS_SharedInfo_encode(&penc, wrap_alg, ukm, keylen); | 1012 | if (EVP_PKEY_CTX_set_ecdh_kdf_outlen(pctx, keylen) <= 0) |
1013 | if (penclen <= 0) | ||
1014 | goto err; | 1013 | goto err; |
1015 | |||
1016 | if (EVP_PKEY_CTX_set0_ecdh_kdf_ukm(pctx, penc, penclen) <= 0) | 1014 | if (EVP_PKEY_CTX_set0_ecdh_kdf_ukm(pctx, penc, penclen) <= 0) |
1017 | goto err; | 1015 | goto err; |
1018 | penc = NULL; | 1016 | penc = NULL; |