]> git.ipfire.org Git - thirdparty/openssl.git/commit
Bugfixes for params to legacy control translations for EC parameters
authorVladimirs Ambrosovs <rodriguez.twister@gmail.com>
Wed, 1 Nov 2023 11:18:14 +0000 (13:18 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 7 Nov 2024 09:40:30 +0000 (10:40 +0100)
commita31bb48b5461b416c813028b1b5fb28e7da42572
treeaa4671957040b9aaf2a279105bf6d1bf7bd465cf
parent0d6f88f473800e212fc22adef71ab62fdeca0368
Bugfixes for params to legacy control translations for EC parameters

param->ctrl translation: Fix fix_ecdh_cofactor()

In POST_PARAMS_TO_CTRL state the fix_ecdh_cofactor() function should
return value in ctx->p1

param->ctrl translation: fix evp_pkey_ctx_setget_params_to_ctrl
 return

Since some of the ctrl operations may return 0 as valid value
(e.g. ecdh_cofactor value 0 is valid setting), before colling
POST_PARAMS_TO_CTRL, we need to check return value for 0 as well
otherwise the evp_pkey_ctx_setget_params_to_ctrl function fails
without a chance to fix the return value

param->ctrl translation: Set ecdh_cofactor default action_type GET

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22587)

(cherry picked from commit 2aaef03339a88e5d693f278406a889657b10fd2d)
crypto/evp/ctrl_params_translate.c