Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
interfaces/innerkits/ | 12-May-2024 | - | 1,300 | 890 | ||
services/ | 12-May-2024 | - | 1,787 | 1,347 | ||
test/ | 12-May-2024 | - | 1,413 | 974 | ||
utils/ | 12-May-2024 | - | 1,268 | 895 | ||
BUILD.gn | D | 12-May-2024 | 1.3 KiB | 35 | 30 | |
LICENSE | D | 12-May-2024 | 10.1 KiB | 177 | 150 | |
OAT.xml | D | 12-May-2024 | 3.7 KiB | 58 | 11 | |
README.md | D | 12-May-2024 | 2 KiB | 51 | 36 | |
README_zh.md | D | 12-May-2024 | 1.9 KiB | 48 | 35 | |
bundle.json | D | 12-May-2024 | 1.8 KiB | 69 | 68 | |
code_signature.gni | D | 12-May-2024 | 859 | 18 | 17 | |
hisysevent.yaml | D | 12-May-2024 | 2.8 KiB | 61 | 17 |
README.md
1# Code Signature 2 3## Introduction 4 5Code signature is a security mechanism on OpenHarmony to protect integrity of the application and verify the validity of the application source on runtime. 6 7The code signature component provides the following features: 8 9- Writing trusted code signing certificates into the kernel 10- Enabling code signing for applicaitons 11- Signing local code 12 13## Directory Structure 14 15``` 16/base/security/code_signature 17├── interfaces # APIs 18│ └── innerkits # 19│ ├── code_sign_utils # APIs for enabling code signing 20│ ├── common # Common basic capacities 21│ └── local_code_sign # APIs for local signing 22├── services # Service layer 23│ ├── key_enable # Certificate initialization 24│ └── local_code_sign # Local signing service 25├── test # Test cases 26│ ├── fuzztest # Fuzz test cases 27│ └── unittest # Unit test cases 28└── utils # Common basic capacities 29``` 30 31## Usage 32### Available APIs 33 34| **API** | **Description** | 35| --- | --- | 36| int32_t EnforceCodeSignForApp(const EntryMap &entryPath, const std::string &signatureFile); | Enforces code signing for an hap | 37| int32_t EnforceCodeSignForFile(const std::string &path, const ByteBuffer &signature); | Enforces code signing for an file | 38| int32_t SignLocalCode(const std::string &filePath, ByteBuffer &signature); | Signs the local code | 39 40### Signing Tool User Guide 41 42**[User Guide](https://gitee.com/openharmony/developtools_hapsigner/blob/master/codesigntool/README.md)** 43 44## 相关仓 45 46## Repositories Involved 47 48**[developtools\_hapsigner](https://gitee.com/openharmony/developtools_hapsigner/blob/master/codesigntool/README.md)** 49 50**[third\_party\_fsverity-utils](https://gitee.com/openharmony/third_party_fsverity-utils/blob/master/README.md)** 51
README_zh.md
1# 代码签名 2 3## 简介 4 5代码签名部件用于支持OpenHarmony的代码签名机制。OpenHarmony使用代码签名提供运行时应用程序的完整性保护,校验应用来源的合法性。 6代码签名部件主要提供如下功能: 7 8- 提供可信代码签名证书写入内核能力 9- 提供代码签名使能能力 10- 提供本地代码签名能力 11 12## 目录 13 14``` 15/base/security/code_signature 16├── interfaces # 接口层 17│ └── innerkits # 18│ ├── code_sign_utils # 使能接口 19│ ├── common # 公共基础能力 20│ └── local_code_sign # 本地签名接口 21├── services # 服务层 22│ ├── key_enable # 证书初始化 23│ └── local_code_sign # 本地签名服务 24├── test # 测试用例 25│ ├── fuzztest # fuzz测试用例 26│ └── unittest # 单元测试用例 27└── utils # 公共基础能力 28``` 29 30## 使用 31### 接口说明 32 33| **接口声明** | **接口描述** | 34| --- | --- | 35| int32_t EnforceCodeSignForApp(const EntryMap &entryPath, const std::string &signatureFile); | 对hap使能代码签名 | 36| int32_t EnforceCodeSignForFile(const std::string &path, const ByteBuffer &signature); | 对文件使能代码签名 | 37| int32_t SignLocalCode(const std::string &filePath, ByteBuffer &signature); | 本地代码签名 | 38 39### 签名工具使用指南 40 41**[使用指南](https://gitee.com/openharmony/developtools_hapsigner/blob/master/codesigntool/README_zh.md)** 42 43## 相关仓 44 45**[developtools\_hapsigner](https://gitee.com/openharmony/developtools_hapsigner/blob/master/codesigntool/README_zh.md)** 46 47**[third\_party\_fsverity-utils](https://gitee.com/openharmony/third_party_fsverity-utils/blob/master/README_zh.md)** 48