]> git.ipfire.org Git - thirdparty/openssl.git/commit
Make error checks on RSA_public_decrypt() consistent
authorNiels Dossche <niels.dossche@ugent.be>
Tue, 19 Aug 2025 20:56:38 +0000 (22:56 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 21 Aug 2025 18:04:40 +0000 (20:04 +0200)
commit3e2f54a718f541b02b599bbf5109587189368e4d
treec52b0b8bdaf2f282c8dc5620c647d65b6aae20c7
parent1d92f3b8b0e580f761a1d2789e2b81624420b098
Make error checks on RSA_public_decrypt() consistent

Some are only checking for a value < 0, some for <= 0, some for == 0, etc.
The documentation tells us that -1 is returned on error, so at least the
== 0 ones are wrong. In general, the return values are checked
inconsistently. This patch makes the return value checks consistent to
the form that seems to occur most.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28306)
crypto/rsa/rsa_pmeth.c
providers/implementations/signature/rsa_sig.c.in