From: Krzysztof Jackiewicz Date: Tue, 5 Jan 2016 12:21:16 +0000 (+0100) Subject: CKM: Revert "Add PASSWORD_PROTECTION_DISABLE feature" X-Git-Tag: security-manager_5.5_testing~9^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c73eeafbc56e91830e07766e71ec4db68106c16c;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git CKM: Revert "Add PASSWORD_PROTECTION_DISABLE feature" This reverts commit 83ce88e2df836f7fe23260f635c6ef69d26c748b. Change-Id: I59bca49f8c4cb67fabda6a455ff7533a507abb6e --- diff --git a/packaging/security-tests.spec b/packaging/security-tests.spec index 4f8930a0..65915375 100644 --- a/packaging/security-tests.spec +++ b/packaging/security-tests.spec @@ -42,18 +42,12 @@ cp %{SOURCE1} . %build export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib" -# password protection enabled -%define ckm_password_protection_disable 1 - cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DDPL_LOG="ON" \ -DVERSION=%{version} \ -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:DEBUG} \ %if "%{sec_product_feature_security_mdfpp_enable}" == "1" -DSECURITY_MDFPP_STATE_ENABLE=1 \ -%endif -%if 0%{?ckm_password_protection_disable} - -DPASSWORD_PROTECTION_DISABLE=1 \ %endif -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCYNARA_DB_DIR=%{_localstatedir}/cynara/db \ diff --git a/src/ckm/CMakeLists.txt b/src/ckm/CMakeLists.txt index f93a9ea9..d623ad38 100644 --- a/src/ckm/CMakeLists.txt +++ b/src/ckm/CMakeLists.txt @@ -27,12 +27,6 @@ ELSE (DEFINED SECURITY_MDFPP_STATE_ENABLED) MESSAGE("SECURITY_MDFPP_STATE_ENABLE DISABLED !") ENDIF (DEFINED SECURITY_MDFPP_STATE_ENABLED) -# password protection flag -IF (DEFINED PASSWORD_PROTECTION_DISABLE) - MESSAGE("PASSWORD_PROTECTION_DISABLE ENABLED !") - ADD_DEFINITIONS("-DPASSWORD_PROTECTION_DISABLE") -ENDIF (DEFINED PASSWORD_PROTECTION_DISABLE) - # Dependencies PKG_CHECK_MODULES(CKM_DEP libsmack diff --git a/src/ckm/capi-testcases.cpp b/src/ckm/capi-testcases.cpp index 53ee42ed..49001e24 100644 --- a/src/ckm/capi-testcases.cpp +++ b/src/ckm/capi-testcases.cpp @@ -2396,17 +2396,11 @@ RUNNER_CHILD_TEST(T3204_CAPI_get_data_from_locked_database) char *password = NULL; ckmc_key_s *test_key = NULL; -#ifndef PASSWORD_PROTECTION_DISABLE RUNNER_ASSERT_MSG( CKMC_ERROR_DB_LOCKED == (temp = ckmc_get_key(alias.c_str(), password, &test_key)), CKMCReadableError(temp)); RUNNER_ASSERT_MSG(NULL == test_key, "Key value should not be changed"); -#else - RUNNER_ASSERT_MSG( - CKMC_ERROR_DB_ALIAS_UNKNOWN == (temp = ckmc_get_key(alias.c_str(), password, &test_key)), - CKMCReadableError(temp)); -#endif } RUNNER_TEST(T3204_deinit) diff --git a/src/ckm/main.cpp b/src/ckm/main.cpp index fde318e0..06694ec9 100644 --- a/src/ckm/main.cpp +++ b/src/ckm/main.cpp @@ -167,11 +167,9 @@ RUNNER_TEST(T0016_Control_negative_wrong_password) RUNNER_ASSERT_MSG( CKM_API_SUCCESS == (temp = control->lockUserKey(USER_APP_2)), "Error=" << CKM::ErrorToString(temp)); -#ifndef PASSWORD_PROTECTION_DISABLE RUNNER_ASSERT_MSG( CKM_API_ERROR_AUTHENTICATION_FAILED == (temp = control->unlockUserKey(USER_APP_2, "incorrect-password")), "Error=" << CKM::ErrorToString(temp)); -#endif RUNNER_ASSERT_MSG( CKM_API_SUCCESS == (temp = control->removeUserData(USER_APP_2)), "Error=" << CKM::ErrorToString(temp)); @@ -3366,15 +3364,9 @@ RUNNER_TEST(T1904_get_data_from_locked_database) int status1 = manager->getKey(CKM::Alias("CertEEE"), CKM::Password(), ptr); -#ifndef PASSWORD_PROTECTION_DISABLE RUNNER_ASSERT_MSG( CKM_API_ERROR_DB_LOCKED == status1, "Could not get key from locked database. Error=" << CKM::ErrorToString(status1)); -#else - RUNNER_ASSERT_MSG( - CKM_API_ERROR_DB_ALIAS_UNKNOWN == status1, - "Could not get key with a wrong alias. Error=" << CKM::ErrorToString(status1)); -#endif } RUNNER_TEST(T1905_deinit)