mirror of
https://github.com/openharmony/tee_tee_dev_kit.git
synced 2026-08-24 19:13:10 -04:00
@@ -286,6 +286,7 @@ def check_drv_cmd_perm_info_item_permission(dyn_key, attrib, value, origin_value
|
||||
raise RuntimeError("you should set cmd while you set cmd permission")
|
||||
check_permssion_unique(value, origin_value)
|
||||
|
||||
|
||||
def check_drv_cmd_perm_info_item_cmd(dyn_key, attrib, value, origin_value):
|
||||
|
||||
if len(dyn_key) == 0:
|
||||
@@ -310,6 +311,7 @@ def check_drv_cmd_perm_info_item_cmd(dyn_key, attrib, value, origin_value):
|
||||
you set cmd permission")
|
||||
check_cmd_unique(value, origin_value)
|
||||
|
||||
|
||||
def check_mac_info_item_permission(dyn_key, attrib, value, origin_value):
|
||||
if len(value) == 0:
|
||||
raise RuntimeError("permssion len should not be 0")
|
||||
@@ -416,6 +418,7 @@ def check_ta_config_rpmb_size(dyn_key, attrib, value, origin_value):
|
||||
if int(value, 10) > 0xffffffff or int(value, 10) <= 0:
|
||||
raise Exception("rpmb size is invalid", value)
|
||||
|
||||
|
||||
def check_ta_config_device_id(dyn_key, attrib, value, origin_value):
|
||||
if len(value) != 64:
|
||||
raise Exception("device_id len is invalid", value)
|
||||
|
||||
@@ -187,6 +187,7 @@ def update_target_type(target_info):
|
||||
return (False, 0)
|
||||
return (True, target_type)
|
||||
|
||||
|
||||
class TargetInfo:
|
||||
def __init__(self, dyn_conf_target_type, service_name, target_type, uuid_val):
|
||||
self.dyn_conf_target_type = dyn_conf_target_type
|
||||
@@ -234,6 +235,7 @@ def check_prop_info(prop_name, prop_value_v):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
class PropInfo:
|
||||
def __init__(self, prop_name, prop_name_t, prop_value_t):
|
||||
self.prop_name = prop_name
|
||||
|
||||
@@ -70,6 +70,7 @@ DEFAULT_INI_PATH = "../../../../../../vendor/huawei/base/tee/tee_dev_kit_ext/con
|
||||
SEC_HEADER_BYTES = 16
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
|
||||
def check_cfg_whitelist_format(intput_str):
|
||||
if intput_str != "":
|
||||
if whitelist_check(intput_str):
|
||||
|
||||
@@ -36,6 +36,7 @@ MAX_USERNAME_LEN = 256
|
||||
MAX_MODULUS_LEN = 1024
|
||||
MAX_PUB_EXP_LEN = 256
|
||||
|
||||
|
||||
def print_hash(byte_buf):
|
||||
buf = [hex(int(i)) for i in byte_buf]
|
||||
output = " ".join(buf)
|
||||
|
||||
Reference in New Issue
Block a user