MIME_decrypt_message now returns the decrypt status instead of PEP_UNKNOWN_ERROR if there is no message returned by decrypt message.
parent
00e5b30e30
commit
529746cb41
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue