[Problem] When data is removed we don't know the custom user password used to
protect the row. The row decryption is performed with empty password and may
fail.
[Solution] Because row will be deleted we can ignore the failing decryption.
This is a temporary solution. It won't work for tz-store. The problem will be
fixed when new encryption is applied.
[Verification] Run TCT tests.
Change-Id: I9c24704a83c5511bd53218738460f2b546c3dd05
* Encryption/decryption with user password and with app key should both be done inside the
* store (import, getKey and generateXKey).
*/
- handler.crypto.decryptRow(Password(), r);
+ try {
+ handler.crypto.decryptRow(Password(), r);
+ } catch (const Exc::AuthenticationFailed&) {
+ LogDebug("Authentication failed when removing data. Ignored.");
+ }
m_decider.getStore(r.dataType, r.exportable).destroy(r);
}