diff options
Diffstat (limited to 'src/libsimaka/simaka_message.c')
-rw-r--r-- | src/libsimaka/simaka_message.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsimaka/simaka_message.c b/src/libsimaka/simaka_message.c index 9d85d1fbc..b64ff1b9a 100644 --- a/src/libsimaka/simaka_message.c +++ b/src/libsimaka/simaka_message.c @@ -469,6 +469,7 @@ static bool decrypt(private_simaka_message_t *this) { bool success; crypter_t *crypter; + chunk_t plain; crypter = this->crypto->get_crypter(this->crypto); if (!crypter || !this->iv.len || !this->encr.len || this->encrypted) @@ -482,12 +483,12 @@ static bool decrypt(private_simaka_message_t *this) return FALSE; } - /* decrypt inline */ - crypter->decrypt(crypter, this->encr, this->iv, NULL); + crypter->decrypt(crypter, this->encr, this->iv, &plain); this->encrypted = TRUE; - success = parse_attributes(this, this->encr); + success = parse_attributes(this, plain); this->encrypted = FALSE; + free(plain.ptr); return success; } |