diff --git a/services/key_enable/utils/include/key_utils.h b/services/key_enable/utils/include/key_utils.h index 7044124d23ad854bcd0e37e027cb5a7bd11e7b9c..7ba018c14421a0973ae953deb74d7147c48cc781 100644 --- a/services/key_enable/utils/include/key_utils.h +++ b/services/key_enable/utils/include/key_utils.h @@ -41,7 +41,6 @@ KeySerial KeyctlRestrictKeyring( const char *restriction); bool IsRdDevice(); -int32_t CheckEfuseStatus(char *buf, ssize_t bunLen); #ifdef __cplusplus } #endif diff --git a/services/key_enable/utils/src/devices_security.cpp b/services/key_enable/utils/src/devices_security.cpp index a1cd19e2ea5abe38f923829bade885f4b74b5922..3ccca6e9476494ded7fb29143bab18d823e16101 100644 --- a/services/key_enable/utils/src/devices_security.cpp +++ b/services/key_enable/utils/src/devices_security.cpp @@ -48,7 +48,7 @@ static bool CheckDeviceMode(char *buf, ssize_t bunLen) return false; } -int32_t CheckEfuseStatus(char *buf, ssize_t bunLen) +static int32_t CheckEfuseStatus(char *buf, ssize_t bunLen) { if (strstr(buf, "efuse_status=1")) { LOG_DEBUG(LABEL, "device is not efused"); diff --git a/test/unittest/key_enable_utils_test.cpp b/test/unittest/key_enable_utils_test.cpp index e10f7442a647e65235789ba3484889e905d06cfd..656863ebd9a53c8468b446a1e6ba7f3ea0b19824 100644 --- a/test/unittest/key_enable_utils_test.cpp +++ b/test/unittest/key_enable_utils_test.cpp @@ -46,36 +46,6 @@ HWTEST_F(KeyEnableUtilsTest, KeyEnableUtilsTest_0001, TestSize.Level0) { EXPECT_EQ(IsRdDevice(), true); } - -/** - * @tc.name: KeyEnableUtilsTest_0002 - * @tc.desc: check efuse status - * @tc.type: Func - * @tc.require: issueI8FCGF - */ -HWTEST_F(KeyEnableUtilsTest, KeyEnableUtilsTest_0002, TestSize.Level0) -{ - std::string str = "efuse_status=0"; - char *buf = const_cast(str.c_str()); - ssize_t bunLen = 0; - int32_t ret = CheckEfuseStatus(buf, bunLen); - EXPECT_EQ(ret, false); -} - -/** - * @tc.name: KeyEnableUtilsTest_0003 - * @tc.desc: check efuse status - * @tc.type: Func - * @tc.require: issueI8FCGF - */ -HWTEST_F(KeyEnableUtilsTest, KeyEnableUtilsTest_0003, TestSize.Level0) -{ - std::string str = "efuse_status=1"; - char *buf = const_cast(str.c_str()); - ssize_t bunLen = 0; - int32_t ret = CheckEfuseStatus(buf, bunLen); - EXPECT_EQ(ret, true); -} } // namespace CodeSign } // namespace Security } // namespace OHOS