diff options
| author | tb <> | 2024-04-17 14:01:33 +0000 |
|---|---|---|
| committer | tb <> | 2024-04-17 14:01:33 +0000 |
| commit | b917d4558ea4dd3da248be47d1d1c7e70aed6bcc (patch) | |
| tree | 640d9483e5687ccf1da384f0c5021ab542f8551e /src/lib/libcrypto | |
| parent | dc6744aa7e38d97c3630de9e4981cac2d87f6dc6 (diff) | |
| download | openbsd-b917d4558ea4dd3da248be47d1d1c7e70aed6bcc.tar.gz openbsd-b917d4558ea4dd3da248be47d1d1c7e70aed6bcc.tar.bz2 openbsd-b917d4558ea4dd3da248be47d1d1c7e70aed6bcc.zip | |
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 'src/lib/libcrypto')
| -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; |
