message: Store original encrypted payload when generating fragments

If we don't do this, get_plain() will fail after generating the message
fragmented unless it was generated non-fragmented previously.
This commit is contained in:
Tobias Brunner 2021-07-19 17:12:09 +02:00
parent b9c69f9080
commit 515b9303de

View File

@ -2257,7 +2257,7 @@ METHOD(message_t, fragment, status_t,
data = generator->get_chunk(generator, NULL);
if (!is_encoded(this))
{
encrypted->destroy(encrypted);
this->payloads->insert_last(this->payloads, encrypted);
}
aead = keymat->get_aead(keymat, FALSE);
/* overhead for the encrypted fragment payload */