代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/security_code_signature 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
代码签名部件用于支持OpenHarmony的代码签名机制。OpenHarmony使用代码签名提供运行时应用程序的完整性保护,校验应用来源的合法性。
代码签名部件架构图
代码签名部件主要提供如下模块功能:
/base/security/code_signature
├── interfaces # 接口层
│ └── innerkits #
│ ├── code_sign_attr_utils # 属性设置接口
│ ├── code_sign_utils # 使能接口
│ ├── common # 公共基础能力
│ └── local_code_sign # 本地签名接口
├── services # 服务层
│ ├── key_enable # 证书初始化
│ └── local_code_sign # 本地签名服务
├── test # 测试用例
│ ├── fuzztest # fuzz测试用例
│ └── unittest # 单元测试用例
└── utils # 公共基础能力
接口声明 | 接口描述 |
---|---|
int32_t EnforceCodeSignForApp(const EntryMap &entryPath, const std::string &signatureFile); | 对hap使能代码签名 |
int32_t EnforceCodeSignForApp(const std::string &path, const EntryMap &entryPathMap, FileType type); | 对hap使能代码签名 |
int32_t EnforceCodeSignForFile(const std::string &path, const ByteBuffer &signature); | 对文件使能代码签名 |
int32_t EnforceCodeSignForAppWithOwnerId(std::string ownerId, const std::string &path, const EntryMap &entryPathMap, FileType type); | 对hap使能代码签名和OwnerId校验 |
int ParseOwnerIdFromSignature(const ByteBuffer &sigbuffer, std::string &ownerID); | 从签名中解析OwnerId |
int32_t EnableKeyInProfile(const std::string &bundleName, const ByteBuffer &profileBuffer); | 信任开发者证书 |
int32_t RemoveKeyInProfile(const std::string &bundleName); | 撤销已信任的开发者证书 |
int32_t InitLocalCertificate(ByteBuffer &cert); | 初始化本地签名证书 |
int32_t SignLocalCode(const std::string &filePath, ByteBuffer &signature); | 本地代码签名 |
int32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature); | 带OwnerId的本地代码签名 |
int InitXpmRegion(void); | 初始化XPM地址 |
int SetXpmOwnerId(uint32_t idType, const char *ownerId); | 设置OwnerId |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。