aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/encoding/message.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-08-25 15:29:53 +0200
committerMartin Willi <martin@revosec.ch>2010-08-25 15:29:53 +0200
commite5c6ebb697ef33143559ebc26ca8a606855ab6d0 (patch)
tree980cbabaf3620b846adaffbf91a057417f0015b8 /src/libcharon/encoding/message.c
parentf1a74a3cab0000e0d2557c6cbdc3bcc59389be9d (diff)
downloadstrongswan-e5c6ebb697ef33143559ebc26ca8a606855ab6d0.tar.bz2
strongswan-e5c6ebb697ef33143559ebc26ca8a606855ab6d0.tar.xz
Use different return values in payload decryption to distinguish between integrity and syntax errors
Diffstat (limited to 'src/libcharon/encoding/message.c')
-rw-r--r--src/libcharon/encoding/message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcharon/encoding/message.c b/src/libcharon/encoding/message.c
index 232cfa353..0d55b8a05 100644
--- a/src/libcharon/encoding/message.c
+++ b/src/libcharon/encoding/message.c
@@ -1224,9 +1224,9 @@ static status_t decrypt_payloads(private_message_t *this, aead_t *aead)
break;
}
chunk.len -= encryption->get_length(encryption);
- if (!encryption->decrypt(encryption, chunk))
+ status = encryption->decrypt(encryption, chunk);
+ if (status != SUCCESS)
{
- status = VERIFY_ERROR;
break;
}