From 720242043b3488a5abf805424847e5cd087bd90b Mon Sep 17 00:00:00 2001 From: Krzysztof Jackiewicz Date: Mon, 14 Sep 2015 17:23:45 +0200 Subject: [PATCH 1/1] Ignore failing row decryption during data removal [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 --- src/manager/service/ckm-logic.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/manager/service/ckm-logic.cpp b/src/manager/service/ckm-logic.cpp index b0cea2c..217d0cd 100644 --- a/src/manager/service/ckm-logic.cpp +++ b/src/manager/service/ckm-logic.cpp @@ -671,7 +671,11 @@ int CKMLogic::removeDataHelper( * 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); } -- 2.7.4