Binlog files have 15 bytes of header XORed with IV

Events saved and read have 15 bytes of header XORed with IV.

Partial events are still not handled.

Next implementation will encrypt the whole event instead of 15 bytes XOR
This commit is contained in:
MassimilianoPinto
2016-10-03 09:39:22 +02:00
parent 6e69c783f3
commit d9bcf6a775
4 changed files with 344 additions and 68 deletions

View File

@ -941,10 +941,11 @@ newSession(ROUTER *instance, SESSION *session)
slave->mariadb10_compat = false;
slave->heartbeat = 0;
slave->lastEventReceived = 0;
slave->encryption_ctx = NULL;
/**
* Add this session to the list of active sessions.
*/
* Add this session to the list of active sessions.
*/
spinlock_acquire(&inst->lock);
slave->next = inst->slaves;
inst->slaves = slave;
@ -1021,6 +1022,10 @@ static void freeSession(ROUTER* router_instance,
{
MXS_FREE(slave->passwd);
}
if (slave->encryption_ctx)
{
MXS_FREE(slave->encryption_ctx);
}
MXS_FREE(slave);
}