MIME_decrypt_message now returns the decrypt status instead of PEP_UNKNOWN_ERROR if there is no message returned by decrypt message.

doc_update_sequoia
Krista Bennett 2017-05-15 15:02:46 +02:00
parent 00e5b30e30
commit 529746cb41
1 changed files with 1 additions and 8 deletions

View File

@ -2511,19 +2511,12 @@ DYNAMIC_API PEP_STATUS MIME_decrypt_message(
dec_msg = message_dup(tmp_msg);
}
// This is for when errors are seriously fatal, not just decryption probs
// Unlikely to happen.
if (decrypt_status > PEP_CANNOT_DECRYPT_UNKNOWN)
if (decrypt_status > PEP_CANNOT_DECRYPT_UNKNOWN || !dec_msg)
{
status = decrypt_status;
GOTO(pep_error);
}
if (!dec_msg) {
status = PEP_UNKNOWN_ERROR;
GOTO(pep_error);
}
status = mime_encode_message(dec_msg, false, mime_plaintext);
if (status == PEP_STATUS_OK)