diff --git a/README_zh.md b/README_zh.md index cfd026cdef1678206c826663a77b180d398b1f55..d27a9ca4dbf9f869b5fb8d12568d8f9b42601b2e 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 b4a7423e127cfc635f027f42b583fd5d46a65572..482a2fa2b58036a98f78eea63853336ce51b2498 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 42a789cd549a9bbb59d2b6a72335ab75810e20fd..d607ebfb33dc6ede4dfdee53294f88a7389f3240 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 a740654e6c54c66a78a3045a2f8d538231340872..ab367c27bb0504dfd68d303ecec247b267861d87 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 3059af3be41d24bdca215f6a88e313db7ec204f5..91ef5bd81ccf94d313753924b67de6b6bd623248 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 127cc79b037f31e85ae6f52c7ca24d8c16597b33..41bf6be8e5bc9dfe5a2037842fabaead5e0057ec 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 a615bf1b617186235eb35f0da090b3fe2487e086..c60de68c9d240a045230617565c8ccdb9d709d5b 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 9305bdbabda1a08ec4ebf2116fdadc0fff96ffc9..a88aa59f77294e0ebbd8dc812e5177237e1d50bb 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 50ca32214cd24d202cf4b796d02379b7f2b57d18..fa231ffd0459ddfc612e342f4196db325446ace3 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 23ebc209d2c48b5b3c03aac6bea1ca1b7578f34c..98fdea0f73356e3bde0af05f599ab54fb75b6001 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 0d629340a27900b2ec56fc3b9829296c8168bb65..f9b24da76ea13363067877e10745a7f43ab04980 --- 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 63f51fbd6b521e952bc960653b1ab3f0a339ad80..19256215cc748d99abf7cac6215857c62d881a49 --- 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 7f5eccec7c855f324e949047f689a470654c3156..d58594ee971bceeb55207312c89b8269416edc67 --- 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 a1dc6b0254d14a8379fdfa1d2662015654593731..4145eec9bf346d9ed31d09e3034b8ecf8771c4e2 --- 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 1a35eef78ccf8572151b6ba08b406eda33d01f41..e2c39d4cabab42884089c24d103d50a796941c2b --- 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 dfde0c794a61487a1f6066d11a138f88fad47e9f..9cd863a136089f5024d477d32c8379a7ff073819 --- 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 e167763dcc46e431871d29eb543530cae33230eb..0be69adf56dd55fcc4b91fffb09e353e4f02fd58 --- 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 382607f1fc0641a318f98d1dd26ba2f999131513..5637ff42111e4d0b02d6c555ad848aa572783c3d --- 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 1aa73674d16cd1e9f1e01af8daacc7f2f9b6cd1c..88f96f64bff61d9698905ce04f085ab9d8af9499 --- 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 b4a884e89872ddefab6aed1ba5de2c13ffa540a2..c127f1486fc6a8a3dfe1f2cca2455935f4a84f36 --- 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 d096c4a7f989a9a9458a82691d9c9af996c6772f..d8cd909f3ebd200f29a8970bb1e6bd41a3f5dd58 --- 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 925460f4218a7a1b79b49cea6fc8eccd2cf0961b..fe91b62ca87465cc374ca15aff6fbf53a8383200 --- 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 26d926e5d3cd2338d00d54fa42de73c955e3a98a..754a87292ec09073a45ab92b9ffe74f69fe593bc --- 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 bf63ff88847cb98177870b7e1a37b4a6e7b051f4..27620cfa7bf1fa6c15d95316045bc403c0abca8e --- 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 a75561b740e73c49b601bf3adc073004e711226e..09ab00fb60f4ac76b235472e49d2942e949639ca --- 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 5fc8cad06aa140bcd728ceaa6d87a4180b4c06c7..a66c5471bf42651500b4d11d98e85e983a4e48e2 --- 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 c4a846c71dbfd1e12113550370eecfc4ccf00ee4..b54d0bff4408161ef9dd452ed675b503e9e3be91 --- 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 5d80ada20524f85f39da4919ff743dfb105153b0..4b860953d4047e74349d0f839e1e9f31a14e5ef6 --- 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 0a7a45444c6de81440e67e388c5411b56d06db70..ba3abc11bec90977d046c97222398163700726b4 --- 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 b5b7a376d9825ad67842b5eb83d0e3c496da4c90..1069c72ec0aab3a7c0a9579e84b861571c0ebc68 --- 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 a9ae782220ddaa4e02debfbf89d577f3bedb65cd..9e258df586d2ccbafbcea7102868ab928ec84b37 --- 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 999f2aee529bde2787384fac2f0e40df52789b0f..f6f93a76e833e2fa4eba60fc972af8ac355707d9 --- 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 554838ad999999452399ee2ac5d9e410f478ca3e..76506730a119f7616d20567f4ebbaee8c6a7e181 --- 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 cefc579e2382903f3c757b3053397ecf33b1cf6e..47479dbdba3c508d70afc81d6426a314693ed86f --- 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 369c06b4d3961b9781fe42c528652f5a550ddc85..f18b846c2efe66f7c0991b0299dd292d4b0ecb47 --- 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 36c154fa65cb799de9cb9d538b58890d667921e3..388fd23ebd2a2008948fc13f2be4ddd1bcdbbac2 --- 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 a87e0a358e382dcba379157d6008923adde89b0c..96370dcc95fba11ed80c068bdb9b23ae2b3077a5 --- 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 b8f5ad543835fbd6f0f059904eff2b3dbac283a3..e9f8b90b9e784aa485b9282dc21b77fe7f2b7e44 --- 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 74e0642e7e7f048630a6624a4bff779f0f76ea7e..c9743a5924be5cb2679515db623da4dc29c4682e --- 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 e00750ad73be42fb4cf35120992d3ca258f52b24..a7c0015a48b4760fde6cb9c05c1e95d6a9355633 --- 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 26b7d04188b7a522e7ae35dcb6d66ef0f8cb8208..45aba14170191cec6adaeb0790f29295c774789e 100644 --- a/test/resource/appverify/ohos_test.xml +++ b/test/resource/appverify/ohos_test.xml @@ -1,6 +1,5 @@ -