summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ec
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-04-17 14:01:34 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-04-17 14:01:34 +0000
commitc39c2797a0836a592bd0a2afb4c7b612dfc0acd3 (patch)
treeb96164ac0965173714a79a8f729a02c5593c6dc7 /lib/libcrypto/ec
parentdc7d1aa3747fcbf6daef40627069ec59f803f2fa (diff)
Shuffle EVP_PKEY_CTX setting together
Another stroke of the already very dirty brush eliminates more traces of ADHD and/or crack. ok jsing
Diffstat (limited to 'lib/libcrypto/ec')
-rw-r--r--lib/libcrypto/ec/ec_ameth.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libcrypto/ec/ec_ameth.c b/lib/libcrypto/ec/ec_ameth.c
index 3848c121472..155c1855b46 100644
--- a/lib/libcrypto/ec/ec_ameth.c
+++ b/lib/libcrypto/ec/ec_ameth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_ameth.c,v 1.62 2024/04/17 14:00:17 tb Exp $ */
+/* $OpenBSD: ec_ameth.c,v 1.63 2024/04/17 14:01:33 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -1006,13 +1006,11 @@ ecdh_cms_encrypt(CMS_RecipientInfo *ri)
wrap_alg->parameter = NULL;
}
- if (EVP_PKEY_CTX_set_ecdh_kdf_outlen(pctx, keylen) <= 0)
+ if ((penclen = CMS_SharedInfo_encode(&penc, wrap_alg, ukm, keylen)) <= 0)
goto err;
- penclen = CMS_SharedInfo_encode(&penc, wrap_alg, ukm, keylen);
- if (penclen <= 0)
+ if (EVP_PKEY_CTX_set_ecdh_kdf_outlen(pctx, keylen) <= 0)
goto err;
-
if (EVP_PKEY_CTX_set0_ecdh_kdf_ukm(pctx, penc, penclen) <= 0)
goto err;
penc = NULL;