mirror of
https://gitee.com/openharmony/security_huks
synced 2024-11-27 00:40:54 +00:00
add code for add store patch for standard system
Signed-off-by: gaoshuyang <gaoshuyang2@huawei.com>
This commit is contained in:
parent
52bd16463a
commit
cdc125a013
@ -31,9 +31,12 @@ declare_args() {
|
||||
# whether use hks config file
|
||||
huks_config_file = ""
|
||||
|
||||
# whether use hks key store path
|
||||
# whether use hks key store path in lite or mini system
|
||||
huks_key_store_path = "/storage/"
|
||||
|
||||
# whether use hks key store patch in standard system
|
||||
huks_key_store_standard_path = "/data/service/el1/public/huks_service"
|
||||
|
||||
# whether huks enable log
|
||||
huks_enable_log = false
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/huks/build/config.gni")
|
||||
import("//base/security/huks/huks.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
@ -44,6 +45,8 @@ ohos_shared_library("huks_engine_core_standard") {
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
cflags +=
|
||||
[ "-DHKS_CONFIG_KEY_STORE_PATH=\"${huks_key_store_standard_path}\"" ]
|
||||
sources = [
|
||||
"src/hks_asn1.c",
|
||||
"src/hks_attest.c",
|
||||
|
@ -5,6 +5,9 @@
|
||||
"mkdir /data/service/el1/public/huks_service 0711 huks_server huks_server",
|
||||
"mkdir /data/service/el1/public/huks_service/maindata 0711 huks_server huks_server",
|
||||
"mkdir /data/service/el1/public/huks_service/bakdata 0711 huks_server huks_server",
|
||||
"mkdir /data/service/el2/public/huks_service 0711 huks_server huks_server",
|
||||
"mkdir /data/service/el2/public/huks_service/maindata 0711 huks_server huks_server",
|
||||
"mkdir /data/service/el2/public/huks_service/bakdata 0711 huks_server huks_server",
|
||||
"start huks_service"
|
||||
]
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/huks/build/config.gni")
|
||||
import("//base/security/huks/huks.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
@ -58,6 +59,8 @@ ohos_static_library("libhuks_service_core_standard_static") {
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
cflags +=
|
||||
[ "-DHKS_CONFIG_KEY_STORE_PATH=\"${huks_key_store_standard_path}\"" ]
|
||||
deps = [
|
||||
"//base/security/huks/frameworks/huks_standard/main/common:libhuks_common_standard_static",
|
||||
"//base/security/huks/frameworks/huks_standard/main/os_dependency:libhuks_os_dependency_standard_static",
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/huks/build/config.gni")
|
||||
import("//base/security/huks/huks.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("//build/test.gni")
|
||||
@ -224,4 +225,5 @@ ohos_unittest("huks_module_test") {
|
||||
"common_event_service:cesfwk_innerkits",
|
||||
]
|
||||
}
|
||||
cflags = [ "-DHKS_CONFIG_KEY_STORE_PATH=\"${huks_key_store_standard_path}\"" ]
|
||||
}
|
||||
|
@ -120,6 +120,8 @@ config("soft_huks_config") {
|
||||
cflags += [ "-D_DEFAULT_SOURCE" ]
|
||||
|
||||
cflags += [ "-D_HUKS_LOG_ENABLE_" ]
|
||||
cflags +=
|
||||
[ "-DHKS_CONFIG_KEY_STORE_PATH=\"${huks_key_store_standard_path}\"" ]
|
||||
}
|
||||
config("hilog_dir") {
|
||||
include_dirs =
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/huks/build/config.gni")
|
||||
import("//build/test.gni")
|
||||
|
||||
module_output_path = "huks_standard/huks_standard_test"
|
||||
@ -35,11 +36,12 @@ ohos_unittest("huks_multithread_test") {
|
||||
"src/hks_storage_test.cpp",
|
||||
]
|
||||
|
||||
cflags = [ "-DHKS_CONFIG_KEY_STORE_PATH=\"${huks_key_store_standard_path}\"" ]
|
||||
cflags_cc = [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
]
|
||||
cflags = cflags_cc
|
||||
cflags += cflags_cc
|
||||
configs = [ "//base/security/huks/frameworks/config/build:coverage_flag" ]
|
||||
include_dirs = [
|
||||
"//base/security/huks/frameworks/huks_standard/main/common/include",
|
||||
|
@ -10,7 +10,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/huks/build/config.gni")
|
||||
import("//base/security/huks/huks.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("//build/test.gni")
|
||||
@ -147,6 +147,6 @@ ohos_unittest("huks_UT_test") {
|
||||
# used by hks_chipset_platform_encrypt_test.cpp
|
||||
"//third_party/json:nlohmann_json_static",
|
||||
]
|
||||
|
||||
cflags = [ "-DHKS_CONFIG_KEY_STORE_PATH=\"${huks_key_store_standard_path}\"" ]
|
||||
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//base/security/huks/build/config.gni")
|
||||
import("//base/security/huks/huks.gni")
|
||||
import("//build/ohos.gni")
|
||||
|
||||
@ -48,4 +49,6 @@ ohos_static_library("libhuks_utils_file_operator_static") {
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
]
|
||||
complete_static_lib = true
|
||||
cflags +=
|
||||
[ "-DHKS_CONFIG_KEY_STORE_PATH=\"${huks_key_store_standard_path}\"" ]
|
||||
}
|
||||
|
@ -21,8 +21,8 @@
|
||||
#define HKS_MAX_FILE_NAME_LEN 512
|
||||
|
||||
#ifdef L2_STANDARD
|
||||
#define HKS_KEY_STORE_PATH "/data/service/el1/public/huks_service/maindata"
|
||||
#define HKS_KEY_STORE_BAK_PATH "/data/service/el1/public/huks_service/bakdata"
|
||||
#define HKS_KEY_STORE_PATH HKS_CONFIG_KEY_STORE_PATH "/maindata"
|
||||
#define HKS_KEY_STORE_BAK_PATH HKS_CONFIG_KEY_STORE_PATH "/bakdata"
|
||||
#else
|
||||
#ifdef _STORAGE_LITE_
|
||||
#define HKS_KEY_STORE_PATH HKS_CONFIG_KEY_STORE_PATH
|
||||
|
Loading…
Reference in New Issue
Block a user