Skip to content

Commit

Permalink
Treat a decryption error as an empty string.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmah888 committed May 2, 2024
1 parent 3006413 commit fbd99b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/iperf_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,9 @@ int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedt
OPENSSL_free(rsa_buffer);
BIO_free(bioBuff);

if (plaintext_len <= 0) {
goto errreturn;
/* Treat a decryption error as an empty string. */
if (plaintext_len < 0) {
plaintext_len = 0;
}

return plaintext_len;
Expand Down

0 comments on commit fbd99b1

Please sign in to comment.