iperf_auth: keep RSA_private_decrypt and RSA_public_encrypt errors#2017
Merged
swlars merged 1 commit intoesnet:masterfrom Mar 23, 2026
Merged
iperf_auth: keep RSA_private_decrypt and RSA_public_encrypt errors#2017swlars merged 1 commit intoesnet:masterfrom
swlars merged 1 commit intoesnet:masterfrom
Conversation
The return values of RSA_public_encrypt and RSA_private_decrypt calls are stored in unsigned types. These functions return -1 upon error. These return values are checked after the call if they are negative, but since they are stored in unsigned type, they are lost - when the error code is compared to 0, the value is always bigger than 0. To avoid this, store the return value in a signed integer, and set the value encryptedtext_len and plaintext_len for later comparison based on the result. Also, change some tab indents to space. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Contributor
|
Thanks for the update and the pull request! I don't see any more warnings, and it seems to work well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
masteror3.1-STABLE) to which this pull request applies:master
None
The return values of
RSA_private_decrypt()andRSA_public_encrypt()calls are stored in unsigned variables, however upon error these functions return -1.This PR stores these return values in signed integers, and makes the error-checking later based on these values. Also, some tab-indentations were mixed among spaces, cleaned them up also.
This is a re-submission of #1926, which I somehow borked.