aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/encoding/message.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2007-10-02 13:31:12 +0000
committerTobias Brunner <tobias@strongswan.org>2007-10-02 13:31:12 +0000
commit9b997daab9908cb970b9a2ef428bcabeee16e307 (patch)
treea52b0b3bdcef03e5296e2e7e2c8bd2066dc19721 /src/charon/encoding/message.c
parent06d00e4f7b65dfb74a3bb19f3c59dc0615681aa5 (diff)
downloadstrongswan-9b997daab9908cb970b9a2ef428bcabeee16e307.tar.bz2
strongswan-9b997daab9908cb970b9a2ef428bcabeee16e307.tar.xz
do not attempt to encrypt payloads without crypter or signer (allows to override message rules)
Diffstat (limited to 'src/charon/encoding/message.c')
-rw-r--r--src/charon/encoding/message.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/charon/encoding/message.c b/src/charon/encoding/message.c
index b093d2550..567fed44f 100644
--- a/src/charon/encoding/message.c
+++ b/src/charon/encoding/message.c
@@ -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();