From 086ea5047559f137cd04558d506b4ed9f1cd2219 Mon Sep 17 00:00:00 2001 From: jidong Date: Thu, 24 Mar 2022 21:38:06 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20f792c7b=20from=20https://gitee.com/JiDo?= =?UTF-8?q?ng-CS/security=5Fappverify/pulls/80=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=86=85=E6=BA=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jidong --- README_zh.md | 10 ++--- .../appverify/include/common/data_source.h | 4 +- .../include/init/trusted_source_manager.h | 4 +- .../appverify/include/util/digest_parameter.h | 4 +- .../appverify/src/init/json_parser_utils.cpp | 6 ++- .../src/init/trusted_source_manager.cpp | 6 +-- .../appverify/src/ticket/ticket_verify.cpp | 2 +- .../appverify/src/util/digest_parameter.cpp | 4 +- .../src/util/hap_verify_openssl_utils.cpp | 6 +-- .../appverify/src/verify/hap_verify_v2.cpp | 7 ++-- interfaces/innerkits/appverify_lite/BUILD.gn | 0 .../include/app_centraldirectory.h | 0 .../appverify_lite/include/app_common.h | 0 .../appverify_lite/include/app_file.h | 2 +- .../appverify_lite/include/app_provision.h | 2 +- .../appverify_lite/include/app_verify.h | 2 +- .../appverify_lite/include/app_verify_hal.h | 2 +- .../appverify_lite/include/app_verify_hap.h | 2 +- .../appverify_lite/include/app_verify_pub.h | 2 +- .../appverify_lite/include/mbedtls_pkcs7.h | 6 +-- .../products/default/app_verify_default.c | 2 +- .../products/default/app_verify_default.h | 2 +- .../appverify_lite/products/ipcamera/BUILD.gn | 2 +- .../products/ipcamera/app_verify_base.c | 2 +- .../products/ipcamera/app_verify_base.h | 2 +- .../appverify_lite/src/app_centraldirectory.c | 3 +- .../innerkits/appverify_lite/src/app_common.c | 0 .../innerkits/appverify_lite/src/app_file.c | 4 +- .../appverify_lite/src/app_provision.c | 25 +++++++------ .../innerkits/appverify_lite/src/app_verify.c | 37 +++++++++++++------ .../appverify_lite/src/app_verify_hal.c | 2 +- .../appverify_lite/src/app_verify_hap.c | 4 +- .../appverify_lite/src/mbedtls_pkcs7.c | 2 +- .../appverify_lite/unittest/BUILD.gn | 2 +- .../unittest/packets/business_packet.cpp | 2 +- .../unittest/packets/modified_packet.cpp | 2 +- .../unittest/packets/success_test.cpp | 2 +- .../unittest/packets/udid_wrong_test.cpp | 2 +- .../unittest/packets/unsigned_packet.cpp | 2 +- .../unittest/packets/wrong_license.cpp | 2 +- .../unittest/src/hap_verify_test.cpp | 2 +- .../unittest/src/hap_verify_test.h | 2 +- .../unittest/src/write_file.cpp | 2 +- .../appverify_lite/unittest/src/write_file.h | 2 +- test/resource/appverify/ohos_test.xml | 3 +- 45 files changed, 100 insertions(+), 83 deletions(-) mode change 100755 => 100644 interfaces/innerkits/appverify_lite/BUILD.gn mode change 100755 => 100644 interfaces/innerkits/appverify_lite/include/app_centraldirectory.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/include/app_common.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/include/app_file.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/include/app_provision.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/include/app_verify.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/include/app_verify_hal.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/include/app_verify_hap.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/include/app_verify_pub.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/include/mbedtls_pkcs7.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/products/default/app_verify_default.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/products/default/app_verify_default.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/products/ipcamera/BUILD.gn mode change 100755 => 100644 interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/src/app_centraldirectory.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/src/app_common.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/src/app_file.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/src/app_provision.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/src/app_verify.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/src/app_verify_hal.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/src/app_verify_hap.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/src/mbedtls_pkcs7.c mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/BUILD.gn mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/packets/business_packet.cpp mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/packets/modified_packet.cpp mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/packets/success_test.cpp mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/packets/udid_wrong_test.cpp mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/packets/unsigned_packet.cpp mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/packets/wrong_license.cpp mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.cpp mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.h mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/src/write_file.cpp mode change 100755 => 100644 interfaces/innerkits/appverify_lite/unittest/src/write_file.h diff --git a/README_zh.md b/README_zh.md index cfd026c..d27a9ca 100644 --- a/README_zh.md +++ b/README_zh.md @@ -14,20 +14,20 @@ 为了确保应用的完整性和来源可靠,OpenHarmony需要对应用进行签名和验签。 -- **应用开发阶段:**开发者完成开发并生成安装包后,需要开发者对安装包进行签名,以证明安装包发布到设备的过程中没有被篡改。OpenHarmony的应用完整性校验模块提供了签名工具、签名证书生成规范,以及签名所需的公钥证书等完整的机制,支撑开发者对应用安装包签名。为了方便开源社区开发者,版本中预置了公钥证书和对应的私钥,为开源社区提供离线签名和校验能力;在OpenHarmony商用版本中应替换此公钥证书和对应的私钥。 +- **应用开发阶段:** 开发者完成开发并生成安装包后,需要开发者对安装包进行签名,以证明安装包发布到设备的过程中没有被篡改。OpenHarmony的应用完整性校验模块提供了签名工具、签名证书生成规范,以及签名所需的公钥证书等完整的机制,支撑开发者对应用安装包签名。为了方便开源社区开发者,版本中预置了公钥证书和对应的私钥,为开源社区提供离线签名和校验能力;在OpenHarmony商用版本中应替换此公钥证书和对应的私钥。 -- **应用安装阶段:**OpenHarmony用户程序框架子系统负责应用的安装。在接收到应用安装包之后,应用程序框架子系统需要解析安装包的签名数据,然后使用应用完整性校验模块的API对签名进行验证,只有校验成功之后才允许安装此应用. 应用完整性校验模块在校验安装包签名数据时,会使用系统预置的公钥证书进行验签。 +- **应用安装阶段:** OpenHarmony用户程序框架子系统负责应用的安装。在接收到应用安装包之后,应用程序框架子系统需要解析安装包的签名数据,然后使用应用完整性校验模块的API对签名进行验证,只有校验成功之后才允许安装此应用. 应用完整性校验模块在校验安装包签名数据时,会使用系统预置的公钥证书进行验签。 ## 系统架构图 **图 1** 应用完整性校验架构图 ![](figures/zh-cn_image_appverify.png "应用完整性校验架构图") -- **子系统间接口:**应用完整性校验模块给其他模块提供的接口; +- **子系统间接口:** 应用完整性校验模块给其他模块提供的接口; -- **完整性校验:**通过验签,保障应用包完整性,防篡改; +- **完整性校验:** 通过验签,保障应用包完整性,防篡改; -- **应用来源识别:**通过匹配签名证书链与可信源列表,识别应用来源。 +- **应用来源识别:** 通过匹配签名证书链与可信源列表,识别应用来源。 ## 目录 diff --git a/interfaces/innerkits/appverify/include/common/data_source.h b/interfaces/innerkits/appverify/include/common/data_source.h index b4a7423..482a2fa 100644 --- a/interfaces/innerkits/appverify/include/common/data_source.h +++ b/interfaces/innerkits/appverify/include/common/data_source.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -23,7 +23,7 @@ namespace Security { namespace Verify { class DataSource { public: - virtual ~DataSource() {}; + virtual ~DataSource() {} virtual bool HasRemaining() const = 0; virtual long long Remaining() const = 0; virtual void Reset() = 0; diff --git a/interfaces/innerkits/appverify/include/init/trusted_source_manager.h b/interfaces/innerkits/appverify/include/init/trusted_source_manager.h index 42a789c..d607ebf 100644 --- a/interfaces/innerkits/appverify/include/init/trusted_source_manager.h +++ b/interfaces/innerkits/appverify/include/init/trusted_source_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -81,7 +81,7 @@ private: static const std::string KEY_OF_ISSUER; static const std::string KEY_OF_MAX_CERTS_PATH; static const std::string KEY_OF_CRITIALCAL_CERT_EXTENSION; - static const std::string APP_GALLARY_SOURCE_NAME; + static const std::string APP_GALLERY_SOURCE_NAME; static const std::string APP_SYSTEM_SOURCE_NAME; static const std::string APP_THIRD_PARTY_PRELOAD_SOURCE_NAME; SourceInfoVec appTrustedSources; diff --git a/interfaces/innerkits/appverify/include/util/digest_parameter.h b/interfaces/innerkits/appverify/include/util/digest_parameter.h index a740654..ab367c2 100644 --- a/interfaces/innerkits/appverify/include/util/digest_parameter.h +++ b/interfaces/innerkits/appverify/include/util/digest_parameter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -34,5 +34,5 @@ public: const EVP_MD* md; EVP_MD_CTX* ptrCtx; }; -} +} // namespace OHOS::Security::Verify #endif // HOSP_DIGESTPARAMETER_H \ No newline at end of file diff --git a/interfaces/innerkits/appverify/src/init/json_parser_utils.cpp b/interfaces/innerkits/appverify/src/init/json_parser_utils.cpp index 3059af3..91ef5bd 100644 --- a/interfaces/innerkits/appverify/src/init/json_parser_utils.cpp +++ b/interfaces/innerkits/appverify/src/init/json_parser_utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -95,7 +95,9 @@ bool JsonParserUtils::ParseJsonToObjVec(const nlohmann::json& json, const std::s void JsonParserUtils::ParseJsonToMap(const nlohmann::json& json, JsonMap& jsonMap) { for (auto it = json.begin(); it != json.end(); it++) { - jsonMap[it.key()] = it.value().get(); + if (it.value().is_string()) { + jsonMap[it.key()] = it.value().get(); + } } } } // namespace Verify diff --git a/interfaces/innerkits/appverify/src/init/trusted_source_manager.cpp b/interfaces/innerkits/appverify/src/init/trusted_source_manager.cpp index 127cc79..41bf6be 100644 --- a/interfaces/innerkits/appverify/src/init/trusted_source_manager.cpp +++ b/interfaces/innerkits/appverify/src/init/trusted_source_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -36,7 +36,7 @@ const std::string TrustedSourceManager::KEY_OF_PROFILE_DEBUG_SIGNING_CERTIFICATE const std::string TrustedSourceManager::KEY_OF_ISSUER = "issuer-ca"; const std::string TrustedSourceManager::KEY_OF_MAX_CERTS_PATH = "max-certs-path"; const std::string TrustedSourceManager::KEY_OF_CRITIALCAL_CERT_EXTENSION = "critialcal-cert-extension"; -const std::string TrustedSourceManager::APP_GALLARY_SOURCE_NAME = "huawei app gallery"; +const std::string TrustedSourceManager::APP_GALLERY_SOURCE_NAME = "huawei app gallery"; const std::string TrustedSourceManager::APP_SYSTEM_SOURCE_NAME = "huawei system apps"; const std::string TrustedSourceManager::APP_THIRD_PARTY_PRELOAD_SOURCE_NAME = "third_party app preload"; @@ -252,7 +252,7 @@ MatchingStates TrustedSourceManager::TrustedSourceListCompare(const std::string& TrustedSources TrustedSourceManager::GetTrustedSource(std::string& sourceName) { - if (APP_GALLARY_SOURCE_NAME == sourceName) { + if (APP_GALLERY_SOURCE_NAME == sourceName) { return APP_GALLARY; } diff --git a/interfaces/innerkits/appverify/src/ticket/ticket_verify.cpp b/interfaces/innerkits/appverify/src/ticket/ticket_verify.cpp index a615bf1..c60de68 100644 --- a/interfaces/innerkits/appverify/src/ticket/ticket_verify.cpp +++ b/interfaces/innerkits/appverify/src/ticket/ticket_verify.cpp @@ -49,7 +49,7 @@ bool CheckTicketFilePath(const std::string& filePath, std::string& standardFileP { char path[PATH_MAX + 1] = { 0x00 }; if (filePath.size() > PATH_MAX || realpath(filePath.c_str(), path) == nullptr) { - HAPVERIFY_LOG_ERROR(LABEL, "It is not a standard path, %{public}s", filePath.c_str()); + HAPVERIFY_LOG_ERROR(LABEL, "filePath is not a standard path"); return false; } standardFilePath = std::string(path); diff --git a/interfaces/innerkits/appverify/src/util/digest_parameter.cpp b/interfaces/innerkits/appverify/src/util/digest_parameter.cpp index 9305bdb..a88aa59 100644 --- a/interfaces/innerkits/appverify/src/util/digest_parameter.cpp +++ b/interfaces/innerkits/appverify/src/util/digest_parameter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -51,4 +51,4 @@ DigestParameter& DigestParameter::operator = (const DigestParameter& other) EVP_MD_CTX_copy(ptrCtx, other.ptrCtx); return *this; } -} \ No newline at end of file +} // namespace OHOS::Security::Verify \ No newline at end of file diff --git a/interfaces/innerkits/appverify/src/util/hap_verify_openssl_utils.cpp b/interfaces/innerkits/appverify/src/util/hap_verify_openssl_utils.cpp index 50ca322..fa231ff 100644 --- a/interfaces/innerkits/appverify/src/util/hap_verify_openssl_utils.cpp +++ b/interfaces/innerkits/appverify/src/util/hap_verify_openssl_utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -160,7 +160,7 @@ bool HapVerifyOpensslUtils::VerifyPkcs7SignedData(Pkcs7Context& pkcs7Context) GetOpensslErrorMessage(); return false; } - char buf[OPENSSL_READ_DATA_LEN_EACH_TIME]; + char buf[OPENSSL_READ_DATA_LEN_EACH_TIME] = {0}; int readLen = BIO_read(p7Bio, buf, sizeof(buf)); int readTime = 0; while ((readLen > 0) && (++readTime < OPENSSL_READ_DATA_MAX_TIME)) { @@ -235,7 +235,7 @@ bool HapVerifyOpensslUtils::IsEnablePss(const PKCS7_SIGNER_INFO* signInfo) return false; } int len = OBJ_obj2txt(oId, sizeof(oId), signInfo->digest_enc_alg->algorithm, 1); - if (len < 0 || len > MAX_OID_LENGTH) { + if (len < 0 || len >= MAX_OID_LENGTH) { HAPVERIFY_LOG_ERROR(LABEL, "Get length of oId failed"); return false; } diff --git a/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp b/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp index 23ebc20..98fdea0 100644 --- a/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp +++ b/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp @@ -49,12 +49,11 @@ int HapVerifyV2::Verify(const std::string& filePath, HapVerifyResult& hapVerifyV RandomAccessFile hapFile; if (!hapFile.Init(standardFilePath)) { - HAPVERIFY_LOG_ERROR(LABEL, "open %{public}s failed", standardFilePath.c_str()); + HAPVERIFY_LOG_ERROR(LABEL, "open standard file failed"); return OPEN_FILE_ERROR; } int resultCode = Verify(hapFile, hapVerifyV1Result); - HAPVERIFY_LOG_INFO(LABEL, "Hap verify %{public}s, result: %{public}d", standardFilePath.c_str(), resultCode); return resultCode; } @@ -62,12 +61,12 @@ bool HapVerifyV2::CheckFilePath(const std::string& filePath, std::string& standa { char path[PATH_MAX + 1] = { 0x00 }; if (filePath.size() > PATH_MAX || realpath(filePath.c_str(), path) == nullptr) { - HAPVERIFY_LOG_ERROR(LABEL, "It is not a standard path, %{public}s", filePath.c_str()); + HAPVERIFY_LOG_ERROR(LABEL, "filePath is not a standard path"); return false; } standardFilePath = std::string(path); if (!std::regex_match(standardFilePath, std::regex(HAP_APP_PATTERN))) { - HAPVERIFY_LOG_ERROR(LABEL, "file is not hap package, %{public}s", standardFilePath.c_str()); + HAPVERIFY_LOG_ERROR(LABEL, "file is not hap package"); return false; } return true; diff --git a/interfaces/innerkits/appverify_lite/BUILD.gn b/interfaces/innerkits/appverify_lite/BUILD.gn old mode 100755 new mode 100644 diff --git a/interfaces/innerkits/appverify_lite/include/app_centraldirectory.h b/interfaces/innerkits/appverify_lite/include/app_centraldirectory.h old mode 100755 new mode 100644 diff --git a/interfaces/innerkits/appverify_lite/include/app_common.h b/interfaces/innerkits/appverify_lite/include/app_common.h old mode 100755 new mode 100644 diff --git a/interfaces/innerkits/appverify_lite/include/app_file.h b/interfaces/innerkits/appverify_lite/include/app_file.h old mode 100755 new mode 100644 index 0d62934..f9b24da --- a/interfaces/innerkits/appverify_lite/include/app_file.h +++ b/interfaces/innerkits/appverify_lite/include/app_file.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/include/app_provision.h b/interfaces/innerkits/appverify_lite/include/app_provision.h old mode 100755 new mode 100644 index 63f51fb..1925621 --- a/interfaces/innerkits/appverify_lite/include/app_provision.h +++ b/interfaces/innerkits/appverify_lite/include/app_provision.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/include/app_verify.h b/interfaces/innerkits/appverify_lite/include/app_verify.h old mode 100755 new mode 100644 index 7f5ecce..d58594e --- a/interfaces/innerkits/appverify_lite/include/app_verify.h +++ b/interfaces/innerkits/appverify_lite/include/app_verify.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/include/app_verify_hal.h b/interfaces/innerkits/appverify_lite/include/app_verify_hal.h old mode 100755 new mode 100644 index a1dc6b0..4145eec --- a/interfaces/innerkits/appverify_lite/include/app_verify_hal.h +++ b/interfaces/innerkits/appverify_lite/include/app_verify_hal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/include/app_verify_hap.h b/interfaces/innerkits/appverify_lite/include/app_verify_hap.h old mode 100755 new mode 100644 index 1a35eef..e2c39d4 --- a/interfaces/innerkits/appverify_lite/include/app_verify_hap.h +++ b/interfaces/innerkits/appverify_lite/include/app_verify_hap.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/include/app_verify_pub.h b/interfaces/innerkits/appverify_lite/include/app_verify_pub.h old mode 100755 new mode 100644 index dfde0c7..9cd863a --- a/interfaces/innerkits/appverify_lite/include/app_verify_pub.h +++ b/interfaces/innerkits/appverify_lite/include/app_verify_pub.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/include/mbedtls_pkcs7.h b/interfaces/innerkits/appverify_lite/include/mbedtls_pkcs7.h old mode 100755 new mode 100644 index e167763..0be69ad --- a/interfaces/innerkits/appverify_lite/include/mbedtls_pkcs7.h +++ b/interfaces/innerkits/appverify_lite/include/mbedtls_pkcs7.h @@ -149,7 +149,7 @@ typedef struct { * bufLen - pkcs7 signed data length * Output : pkcs7 - resolved pkcs7 data, caller provide this arg, malloc * from heap memory or use stack memory, if malloced - * from heap memory, caller must freed the memroy after + * from heap memory, caller must freed the memory after * called PKCS7_FreeRes * Return : 0 on success, others on fail * Note : need to call PKCS7_FreeRes to free the resource when success @@ -216,7 +216,7 @@ int PKCS7_GetDigestInSignerAuthAttr(const SignerInfo *signer, unsigned char **di * Function : PKCS7_GetSignerAuthAttr * Description : get the signer's auth attribute content, which maybe signed by * signer, so upper layer can call this to get to-be-signed data, - * then caculate digest of it for signature verification + * then calculate digest of it for signature verification * Input : signer - pkcs7 signer info * Output : data - pointer to signer's auth attribute start location * user need not to free this var @@ -229,7 +229,7 @@ int PKCS7_GetSignerAuthAttr(const SignerInfo *signer, unsigned char **data, size * Function : PKCS7_VerifySignerSignature * Description : Verify all of signer's signature * Input : pkcs7 - pkcs7 signed data header - * calcDigest - callback function for upper layer user to caculate + * calcDigest - callback function for upper layer user to calculate * the digest of signature * Output : NA * Return : 0 on success, others on fail diff --git a/interfaces/innerkits/appverify_lite/products/default/app_verify_default.c b/interfaces/innerkits/appverify_lite/products/default/app_verify_default.c old mode 100755 new mode 100644 index 382607f..5637ff4 --- a/interfaces/innerkits/appverify_lite/products/default/app_verify_default.c +++ b/interfaces/innerkits/appverify_lite/products/default/app_verify_default.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/products/default/app_verify_default.h b/interfaces/innerkits/appverify_lite/products/default/app_verify_default.h old mode 100755 new mode 100644 index 1aa7367..88f96f6 --- a/interfaces/innerkits/appverify_lite/products/default/app_verify_default.h +++ b/interfaces/innerkits/appverify_lite/products/default/app_verify_default.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/products/ipcamera/BUILD.gn b/interfaces/innerkits/appverify_lite/products/ipcamera/BUILD.gn old mode 100755 new mode 100644 index b4a884e..c127f14 --- a/interfaces/innerkits/appverify_lite/products/ipcamera/BUILD.gn +++ b/interfaces/innerkits/appverify_lite/products/ipcamera/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Huawei Device Co., Ltd. +# Copyright (c) 2020-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.c b/interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.c old mode 100755 new mode 100644 index d096c4a..d8cd909 --- a/interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.c +++ b/interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.h b/interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.h old mode 100755 new mode 100644 index 925460f..fe91b62 --- a/interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.h +++ b/interfaces/innerkits/appverify_lite/products/ipcamera/app_verify_base.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/src/app_centraldirectory.c b/interfaces/innerkits/appverify_lite/src/app_centraldirectory.c old mode 100755 new mode 100644 index 26d926e..754a872 --- a/interfaces/innerkits/appverify_lite/src/app_centraldirectory.c +++ b/interfaces/innerkits/appverify_lite/src/app_centraldirectory.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -89,6 +89,7 @@ void ClearHapBuffer(HapBuf *hapBuffer) } (void)memset_s(hapBuffer->buffer, hapBuffer->len, 0, hapBuffer->len); APPV_FREE(hapBuffer->buffer); + hapBuffer->buffer = NULL; hapBuffer->len = 0; } diff --git a/interfaces/innerkits/appverify_lite/src/app_common.c b/interfaces/innerkits/appverify_lite/src/app_common.c old mode 100755 new mode 100644 diff --git a/interfaces/innerkits/appverify_lite/src/app_file.c b/interfaces/innerkits/appverify_lite/src/app_file.c old mode 100755 new mode 100644 index bf63ff8..27620cf --- a/interfaces/innerkits/appverify_lite/src/app_file.c +++ b/interfaces/innerkits/appverify_lite/src/app_file.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -46,7 +46,7 @@ int InitVerify(FileRead *file, const char *filePath, int *handle) *handle = open(path, O_RDONLY, 0); if (*handle < 0) { APPV_FREE(path); - LOG_PRINT_STR("file open error %s", path); + LOG_PRINT_STR("file open error"); return V_ERR_FILE_OPEN; } if (g_memoryPageSize == 0) { diff --git a/interfaces/innerkits/appverify_lite/src/app_provision.c b/interfaces/innerkits/appverify_lite/src/app_provision.c old mode 100755 new mode 100644 index a75561b..09ab00f --- a/interfaces/innerkits/appverify_lite/src/app_provision.c +++ b/interfaces/innerkits/appverify_lite/src/app_provision.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -23,8 +23,8 @@ static void ProfInit(ProfileProf *pf) { - int ret = memset_s(pf, sizeof(ProfileProf), 0, sizeof(ProfileProf)); - if (ret != V_OK) { + errno_t ret = memset_s(pf, sizeof(ProfileProf), 0, sizeof(ProfileProf)); + if (ret != EOK) { LOG_ERROR("memset failed"); return; } @@ -48,8 +48,8 @@ static char *GetStringTag(const cJSON *root, const char *tag) LOG_ERROR("malloc error: %d", objLen + 1); return NULL; } - int ret = strcpy_s(value, objLen + 1, jsonObj->valuestring); - if (ret != V_OK) { + errno_t ret = strcpy_s(value, objLen + 1, jsonObj->valuestring); + if (ret != EOK) { APPV_FREE(value); LOG_ERROR("strcpy error: %d", ret); return NULL; @@ -85,7 +85,10 @@ static char **GetStringArrayTag(const cJSON *root, const char *tag, int *numRetu return NULL; } char **value = APPV_MALLOC(sizeof(char *) * num); - P_NULL_RETURN_NULL_WTTH_LOG(value); + if (value == NULL) { + *numReturn = 0; + return NULL; + } (void)memset_s(value, sizeof(char *) * num, 0, sizeof(char *) * num); for (int i = 0; i < num; i++) { @@ -96,8 +99,8 @@ static char **GetStringArrayTag(const cJSON *root, const char *tag, int *numRetu value[i] = APPV_MALLOC(len + 1); P_NULL_GOTO_WTTH_LOG(value[i]); - int ret = strcpy_s(value[i], len + 1, item->valuestring); - if (ret != V_OK) { + errno_t ret = strcpy_s(value[i], len + 1, item->valuestring); + if (ret != EOK) { LOG_ERROR("str cpy error : %d", ret); FreeStringAttay(value, num); return NULL; @@ -207,8 +210,8 @@ static int GetProfIssuerInfo(const cJSON *root, ProfileProf *pf) if (pf->issuer == NULL) { return V_ERR; } - int ret = strcpy_s(pf->issuer, len + 1, APP_STORE); - if (ret != V_OK) { + errno_t ret = strcpy_s(pf->issuer, len + 1, APP_STORE); + if (ret != EOK) { APPV_FREE(pf->issuer); LOG_ERROR("str cpy error: %d", ret); } @@ -312,7 +315,7 @@ int ParseProfile(const char *buf, int len, ProfileProf *pf) ret = GetProfIssuerInfo(root, pf); P_ERR_GOTO_WTTH_LOG(ret); - LOG_INFO("parse profile json sucess"); + LOG_INFO("parse profile json success"); cJSON_Delete(root); return V_OK; diff --git a/interfaces/innerkits/appverify_lite/src/app_verify.c b/interfaces/innerkits/appverify_lite/src/app_verify.c old mode 100755 new mode 100644 index 5fc8cad..a66c547 --- a/interfaces/innerkits/appverify_lite/src/app_verify.c +++ b/interfaces/innerkits/appverify_lite/src/app_verify.c @@ -329,7 +329,7 @@ static int VerifyRawHash(const SignatureInfo *signInfo, const FileRead *fileRead P_NULL_RETURN_WTTH_LOG(content); ret = memcpy_s(content, sizeof(ContentInfo), input, inputLen); - if (ret != V_OK) { + if (ret != EOK) { LOG_ERROR("mem cpy error, ret: %d", ret); APPV_FREE(content); return ret; @@ -497,7 +497,7 @@ static int VerifyProfileSignGetRaw(const char *buf, int len, char **profileConte int ret = PKCS7_ParseSignedData((unsigned char *)buf, (size_t)len, pkcs7); P_ERR_GOTO_WTTH_LOG(ret); - LOG_INFO("pkcs7 parse message sucess"); + LOG_INFO("pkcs7 parse message success"); /* verify sign, rawdata */ ret = PKCS7_VerifyCertsChain(pkcs7); @@ -554,7 +554,7 @@ static unsigned char *GetRsaPk(const mbedtls_pk_context *pk, int *len) return NULL; } int ret = memset_s(buf, MAX_PK_BUF, 0, MAX_PK_BUF); - if (ret != V_OK) { + if (ret != EOK) { LOG_ERROR("memset error"); APPV_FREE(buf); return NULL; @@ -564,23 +564,27 @@ static unsigned char *GetRsaPk(const mbedtls_pk_context *pk, int *len) LOG_INFO("GetRsaPk pkLen %d", pkLen); if (pkLen < 0 || pkLen > MAX_PK_BUF) { LOG_ERROR("get pk buf error"); + (void)memset_s(buf, MAX_PK_BUF, 0, MAX_PK_BUF); APPV_FREE(buf); return NULL; } unsigned char *pkBuf = APPV_MALLOC(pkLen); if (pkBuf == NULL) { LOG_ERROR("malloc error"); + (void)memset_s(buf, MAX_PK_BUF, 0, MAX_PK_BUF); APPV_FREE(buf); return NULL; } ret = memcpy_s(pkBuf, pkLen, c, pkLen); - if (ret != V_OK) { + if (ret != EOK) { LOG_ERROR("mem copy error: %d", ret); + (void)memset_s(buf, MAX_PK_BUF, 0, MAX_PK_BUF); APPV_FREE(buf); APPV_FREE(pkBuf); return NULL; } *len = pkLen; + (void)memset_s(buf, MAX_PK_BUF, 0, MAX_PK_BUF); APPV_FREE(buf); return pkBuf; } @@ -597,10 +601,17 @@ static unsigned char *GetEcPk(const mbedtls_pk_context *pk, int *len) LOG_ERROR("malloc error"); return NULL; } - int ret = mbedtls_ecp_point_write_binary(&ecCtx->grp, &ecCtx->Q, - MBEDTLS_ECP_PF_UNCOMPRESSED, (size_t *)len, buf, MBEDTLS_ECP_MAX_PT_LEN); + int ret = memset_s(buf, MBEDTLS_ECP_MAX_PT_LEN, 0, MBEDTLS_ECP_MAX_PT_LEN); + if (ret != EOK) { + LOG_ERROR("memset error"); + APPV_FREE(buf); + return NULL; + } + ret = mbedtls_ecp_point_write_binary(&ecCtx->grp, &ecCtx->Q, MBEDTLS_ECP_PF_UNCOMPRESSED, + (size_t *)len, buf, MBEDTLS_ECP_MAX_PT_LEN); if (ret != V_OK) { LOG_ERROR("get ecc pk key error"); + (void)memset_s(buf, MBEDTLS_ECP_MAX_PT_LEN, 0, MBEDTLS_ECP_MAX_PT_LEN); APPV_FREE(buf); return NULL; } @@ -612,12 +623,14 @@ static unsigned char *GetEcPk(const mbedtls_pk_context *pk, int *len) unsigned char *pkBuf = APPV_MALLOC(*len); if (pkBuf == NULL) { LOG_ERROR("malloc error"); + (void)memset_s(buf, MBEDTLS_ECP_MAX_PT_LEN, 0, MBEDTLS_ECP_MAX_PT_LEN); APPV_FREE(buf); return NULL; } ret = memcpy_s(pkBuf, *len, buf, *len); - if (ret != V_OK) { + if (ret != EOK) { LOG_ERROR("mem copy error: %d", ret); + (void)memset_s(buf, MBEDTLS_ECP_MAX_PT_LEN, 0, MBEDTLS_ECP_MAX_PT_LEN); APPV_FREE(buf); APPV_FREE(pkBuf); return NULL; @@ -811,7 +824,7 @@ static int CmpCert(const mbedtls_x509_crt *certA, const CertInfo *binSignCert) } if (memcmp(bufA, binSignCert->pkBuf, lenA)) { - LOG_ERROR("pk content diffrent"); + LOG_ERROR("pk content different"); APPV_FREE(bufA); return V_ERR; } @@ -910,7 +923,7 @@ static int CheckAppSignCertWithProfile(int appCertType, CertInfo *binSignCert, P static int CertInfoInit(CertInfo *certInfo) { int ret = memset_s(certInfo, sizeof(CertInfo), 0, sizeof(CertInfo)); - if (ret != V_OK) { + if (ret != EOK) { LOG_ERROR("memset error"); } return ret; @@ -963,7 +976,7 @@ static int GetCertInfo(const mbedtls_x509_crt *ctr, CertInfo **binSignCert) } certInfo->issuer[certInfo->issuerLen] = '\0'; ret = memcpy_s(certInfo->issuer, certInfo->issuerLen, ctr->issuer_raw.p, ctr->issuer_raw.len); - if (ret != V_OK) { + if (ret != EOK) { ret = V_ERR_MEMCPY; goto EXIT; } @@ -974,7 +987,7 @@ static int GetCertInfo(const mbedtls_x509_crt *ctr, CertInfo **binSignCert) } certInfo->subject[certInfo->subjectLen] = '\0'; ret = memcpy_s(certInfo->subject, certInfo->subjectLen, ctr->subject_raw.p, ctr->subject_raw.len); - if (ret != V_OK) { + if (ret != EOK) { ret = V_ERR_MEMCPY; goto EXIT; } @@ -1091,7 +1104,7 @@ static int VerifyBinSign(SignatureInfo *signInfo, int fp, CertInfo **signCert, i return V_ERR_PARSE_PKC7_DATA; } /* pkcs7 handle the content of signBuf, do not free signBuf */ - LOG_INFO("pkcs7 parse message sucess"); + LOG_INFO("pkcs7 parse message success"); /* raw buf len = sign block head offset */ fileRead = GetFileRead(fp, 0, blockHead.offset); diff --git a/interfaces/innerkits/appverify_lite/src/app_verify_hal.c b/interfaces/innerkits/appverify_lite/src/app_verify_hal.c old mode 100755 new mode 100644 index c4a846c..b54d0bf --- a/interfaces/innerkits/appverify_lite/src/app_verify_hal.c +++ b/interfaces/innerkits/appverify_lite/src/app_verify_hal.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/src/app_verify_hap.c b/interfaces/innerkits/appverify_lite/src/app_verify_hap.c old mode 100755 new mode 100644 index 5d80ada..4b86095 --- a/interfaces/innerkits/appverify_lite/src/app_verify_hap.c +++ b/interfaces/innerkits/appverify_lite/src/app_verify_hap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -35,7 +35,7 @@ int GetDigestAlgorithmId(unsigned int signAlgorithm) case ALGORITHM_PKCS1_SHA512: return HASH_ALG_SHA512; default: - LOG_ERROR("signAlgorithm: %d error", signAlgorithm); + LOG_ERROR("signAlgorithm: %u error", signAlgorithm); return V_ERR; } } diff --git a/interfaces/innerkits/appverify_lite/src/mbedtls_pkcs7.c b/interfaces/innerkits/appverify_lite/src/mbedtls_pkcs7.c old mode 100755 new mode 100644 index 0a7a454..ba3abc1 --- a/interfaces/innerkits/appverify_lite/src/mbedtls_pkcs7.c +++ b/interfaces/innerkits/appverify_lite/src/mbedtls_pkcs7.c @@ -48,7 +48,7 @@ do { \ if ((rc) != PKCS7_SUCC) \ { \ - LOG_ERROR("%s:%u, error occured, ret:%d", __FUNCTION__, __LINE__, (rc)); \ + LOG_ERROR("%s:%u, error occurred, ret:%d", __FUNCTION__, __LINE__, (rc)); \ return rc; \ } \ } while (0) diff --git a/interfaces/innerkits/appverify_lite/unittest/BUILD.gn b/interfaces/innerkits/appverify_lite/unittest/BUILD.gn old mode 100755 new mode 100644 index b5b7a37..1069c72 --- a/interfaces/innerkits/appverify_lite/unittest/BUILD.gn +++ b/interfaces/innerkits/appverify_lite/unittest/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Huawei Device Co., Ltd. +# Copyright (c) 2020-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/packets/business_packet.cpp b/interfaces/innerkits/appverify_lite/unittest/packets/business_packet.cpp old mode 100755 new mode 100644 index a9ae782..9e258df --- a/interfaces/innerkits/appverify_lite/unittest/packets/business_packet.cpp +++ b/interfaces/innerkits/appverify_lite/unittest/packets/business_packet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/packets/modified_packet.cpp b/interfaces/innerkits/appverify_lite/unittest/packets/modified_packet.cpp old mode 100755 new mode 100644 index 999f2ae..f6f93a7 --- a/interfaces/innerkits/appverify_lite/unittest/packets/modified_packet.cpp +++ b/interfaces/innerkits/appverify_lite/unittest/packets/modified_packet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/packets/success_test.cpp b/interfaces/innerkits/appverify_lite/unittest/packets/success_test.cpp old mode 100755 new mode 100644 index 554838a..7650673 --- a/interfaces/innerkits/appverify_lite/unittest/packets/success_test.cpp +++ b/interfaces/innerkits/appverify_lite/unittest/packets/success_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/packets/udid_wrong_test.cpp b/interfaces/innerkits/appverify_lite/unittest/packets/udid_wrong_test.cpp old mode 100755 new mode 100644 index cefc579..47479db --- a/interfaces/innerkits/appverify_lite/unittest/packets/udid_wrong_test.cpp +++ b/interfaces/innerkits/appverify_lite/unittest/packets/udid_wrong_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/packets/unsigned_packet.cpp b/interfaces/innerkits/appverify_lite/unittest/packets/unsigned_packet.cpp old mode 100755 new mode 100644 index 369c06b..f18b846 --- a/interfaces/innerkits/appverify_lite/unittest/packets/unsigned_packet.cpp +++ b/interfaces/innerkits/appverify_lite/unittest/packets/unsigned_packet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/packets/wrong_license.cpp b/interfaces/innerkits/appverify_lite/unittest/packets/wrong_license.cpp old mode 100755 new mode 100644 index 36c154f..388fd23 --- a/interfaces/innerkits/appverify_lite/unittest/packets/wrong_license.cpp +++ b/interfaces/innerkits/appverify_lite/unittest/packets/wrong_license.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.cpp b/interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.cpp old mode 100755 new mode 100644 index a87e0a3..96370dc --- a/interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.cpp +++ b/interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.h b/interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.h old mode 100755 new mode 100644 index b8f5ad5..e9f8b90 --- a/interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.h +++ b/interfaces/innerkits/appverify_lite/unittest/src/hap_verify_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/src/write_file.cpp b/interfaces/innerkits/appverify_lite/unittest/src/write_file.cpp old mode 100755 new mode 100644 index 74e0642..c9743a5 --- a/interfaces/innerkits/appverify_lite/unittest/src/write_file.cpp +++ b/interfaces/innerkits/appverify_lite/unittest/src/write_file.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/interfaces/innerkits/appverify_lite/unittest/src/write_file.h b/interfaces/innerkits/appverify_lite/unittest/src/write_file.h old mode 100755 new mode 100644 index e00750a..a7c0015 --- a/interfaces/innerkits/appverify_lite/unittest/src/write_file.h +++ b/interfaces/innerkits/appverify_lite/unittest/src/write_file.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Huawei Device Co., Ltd. + * Copyright (c) 2020-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/test/resource/appverify/ohos_test.xml b/test/resource/appverify/ohos_test.xml index 26b7d04..45aba14 100644 --- a/test/resource/appverify/ohos_test.xml +++ b/test/resource/appverify/ohos_test.xml @@ -1,6 +1,5 @@ -