From 83a7f026e8c2dd64d132f0ebe2d1f46719bec11e Mon Sep 17 00:00:00 2001 From: zhaoshuyuan Date: Fri, 22 Nov 2024 20:22:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=A1=86=E6=9E=B6=E9=80=82=E5=BA=94?= =?UTF-8?q?=E5=8F=8C=E6=A1=86=E6=9E=B6=E5=AE=89=E5=85=A8=E5=8A=A0=E5=9B=BA?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaoshuyuan --- services/storage_daemon/crypto/src/key_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/storage_daemon/crypto/src/key_manager.cpp b/services/storage_daemon/crypto/src/key_manager.cpp index bbdf5d11..b19c615a 100644 --- a/services/storage_daemon/crypto/src/key_manager.cpp +++ b/services/storage_daemon/crypto/src/key_manager.cpp @@ -46,6 +46,7 @@ namespace OHOS { namespace StorageDaemon { const UserAuth NULL_KEY_AUTH = {}; const std::string DEFAULT_NEED_RESTORE_VERSION = "1"; +const std::string DEFAULT_NEED_RESTORE_UPDATE_VERSION = "3"; constexpr const char *UECE_PATH = "/dev/fbex_uece"; std::shared_ptr KeyManager::GetBaseKey(const std::string& dir) @@ -352,7 +353,7 @@ bool KeyManager::IsNeedClearKeyFile(std::string file) return false; } - if (version != DEFAULT_NEED_RESTORE_VERSION) { + if (version != DEFAULT_NEED_RESTORE_VERSION && version != DEFAULT_NEED_RESTORE_UPDATE_VERSION) { LOGE("need to clear, file is %{private}s, version is %{public}s.", file.c_str(), version.c_str()); return true; } -- Gitee