]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix rsa_sigalg_set_ctx_params() to return 1 for unknown parameters.
authorslontis <shane.lontis@oracle.com>
Fri, 20 Sep 2024 00:37:55 +0000 (10:37 +1000)
committerTomas Mraz <tomas@openssl.org>
Fri, 4 Oct 2024 15:41:13 +0000 (17:41 +0200)
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 <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25570)

providers/implementations/signature/rsa_sig.c

index d11b8dc345895ef3f7f9bc942f5e2b54f3a539c3..53ffc547dba6b27a1b032196fca9b65ebb17461a 100644 (file)
@@ -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)                                         \