do not attempt to encrypt payloads without crypter or signer (allows to override message rules)

This commit is contained in:
Tobias Brunner 2007-10-02 13:31:12 +00:00
parent 06d00e4f7b
commit 9b997daab9
1 changed files with 7 additions and 0 deletions

View File

@ -681,6 +681,13 @@ static status_t encrypt_payloads (private_message_t *this,crypter_t *crypter, si
return SUCCESS;
}
if (!crypter || !signer)
{
DBG2(DBG_ENC, "no crypter or signer specified, do not encrypt message");
/* message contains no content to encrypt */
return SUCCESS;
}
DBG2(DBG_ENC, "copy all payloads to a temporary list");
all_payloads = linked_list_create();