mirror of https://github.com/openssl/openssl.git
evp_pkey_ctx_setget_params_to_ctrl(): Always properly set ctx.action_type
Fixes #24698
Some applicable translations are bidirectional so they have
NONE action_type. However we need to set the real action_type
in the ctx.
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/24709)
(cherry picked from commit 55c1458303)
This commit is contained in:
parent
c94b641cca
commit
93991bf3de
|
|
@ -2777,7 +2777,7 @@ static int evp_pkey_ctx_setget_params_to_ctrl(EVP_PKEY_CTX *pctx,
|
||||||
fixup_args_fn *fixup = default_fixup_args;
|
fixup_args_fn *fixup = default_fixup_args;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
tmpl.action_type = action_type;
|
ctx.action_type = tmpl.action_type = action_type;
|
||||||
tmpl.keytype1 = tmpl.keytype2 = keytype;
|
tmpl.keytype1 = tmpl.keytype2 = keytype;
|
||||||
tmpl.optype = optype;
|
tmpl.optype = optype;
|
||||||
tmpl.param_key = params->key;
|
tmpl.param_key = params->key;
|
||||||
|
|
@ -2786,7 +2786,6 @@ static int evp_pkey_ctx_setget_params_to_ctrl(EVP_PKEY_CTX *pctx,
|
||||||
if (translation != NULL) {
|
if (translation != NULL) {
|
||||||
if (translation->fixup_args != NULL)
|
if (translation->fixup_args != NULL)
|
||||||
fixup = translation->fixup_args;
|
fixup = translation->fixup_args;
|
||||||
ctx.action_type = translation->action_type;
|
|
||||||
ctx.ctrl_cmd = translation->ctrl_num;
|
ctx.ctrl_cmd = translation->ctrl_num;
|
||||||
}
|
}
|
||||||
ctx.pctx = pctx;
|
ctx.pctx = pctx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue