tdd补偿

Signed-off-by: zhenghui <zhenghui25@huawei.com>
This commit is contained in:
zhenghui 2024-08-14 10:58:02 +08:00
parent 238419881a
commit 7f4ed0937f
2 changed files with 8 additions and 7 deletions

View File

@ -38,20 +38,19 @@ ohos_source_set("key_enable_src_set") {
ohos_unittest("add_cert_path_unittest") {
module_out_path = "security/code_signature"
sources = [
"add_cert_path_test.cpp",
"${code_signature_root_dir}/services/key_enable/utils/src/cert_path.cpp",
"add_cert_path_test.cpp",
]
include_dirs = [ "${code_signature_root_dir}/services/key_enable/utils/include" ]
include_dirs =
[ "${code_signature_root_dir}/services/key_enable/utils/include" ]
configs = [
"${code_signature_root_dir}:common_utils_config",
"${code_signature_root_dir}:common_public_config",
]
deps = [
"${selinux_dir}:libselinux",
]
deps = [ "${selinux_dir}:libselinux" ]
external_deps = [
"hilog:libhilog",
"init:libbegetutil"
"init:libbegetutil",
]
}

View File

@ -19,7 +19,7 @@
#include <gtest/gtest.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <time.h>
#include <ctime>
#include <unistd.h>
#include "cert_path.h"
@ -59,6 +59,8 @@ static CertPathInfo MakeCertPathInfo(const char *signing, const char *issuer,
uint32_t max_cert_chain, uint32_t cert_path_type)
{
CertPathInfo arg = { 0 };
arg.signing = reinterpret_cast<uint64_t>(signing);
arg.issuer = reinterpret_cast<uint64_t>(issuer);
arg.signing_length = strlen(signing);
arg.issuer_length = strlen(issuer);
arg.path_len = max_cert_chain;