From: slontis Date: Fri, 20 Sep 2024 00:37:55 +0000 (+1000) Subject: Fix rsa_sigalg_set_ctx_params() to return 1 for unknown parameters. X-Git-Tag: openssl-3.5.0-alpha1~1051 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=349815b57f0d19b040ad8733975b7b5698570dc3;p=thirdparty%2Fopenssl.git Fix rsa_sigalg_set_ctx_params() to return 1 for unknown parameters. This keeps the code consistent with the changes done for other algorithms that support sigalg_set_ctx_params(). set_ctx_params() should always return 1 if the parameter is unknown. Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25570) --- diff --git a/providers/implementations/signature/rsa_sig.c b/providers/implementations/signature/rsa_sig.c index d11b8dc3458..53ffc547dba 100644 --- a/providers/implementations/signature/rsa_sig.c +++ b/providers/implementations/signature/rsa_sig.c @@ -2003,11 +2003,8 @@ static int rsa_sigalg_set_ctx_params(void *vprsactx, const OSSL_PARAM params[]) 0, &prsactx->siglen)) return 0; } - return 1; } - - /* Wrong operation */ - return 0; + return 1; } #define IMPL_RSA_SIGALG(md, MD) \