Fix incomplete error check on RSA_public_decrypt()
authorndossche <niels.dossche@ugent.be>
Thu, 9 Feb 2023 08:49:47 +0000 (09:49 +0100)
committerPauli <pauli@openssl.org>
Tue, 28 Feb 2023 03:36:15 +0000 (14:36 +1100)
commit8195e59986031f6f33e2569551d771904433fa04
tree8719b3b594abdace9bebafc783c1ce6fffbcfef2
parent5df5032ab02d7a17e07435de777d730bae190253
Fix incomplete error check on RSA_public_decrypt()

According to the documentation and my analysis tool RSA_public_decrypt()
can return -1 on error, but this is not checked. Fix it by changing the
error condition.

CLA: trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20250)
providers/implementations/signature/rsa_sig.c