From df7f0bc3efaab99c34008fb52200c49f22d32264 Mon Sep 17 00:00:00 2001 From: zfeixiang Date: Thu, 24 Jul 2025 07:22:46 +0000 Subject: [PATCH 1/2] update README_zh.md. Signed-off-by: zfeixiang --- README_zh.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README_zh.md b/README_zh.md index 31a7c48..64bb4b8 100644 --- a/README_zh.md +++ b/README_zh.md @@ -31,6 +31,7 @@ │ ├── key_enable # 证书初始化 │ └── local_code_sign # 本地签名服务 ├── test # 测试用例 +│ ├── common # 测试通用能力 │ ├── fuzztest # fuzz测试用例 │ └── unittest # 单元测试用例 └── utils # 公共基础能力 -- Gitee From b22fcd707ef1b0c52eedd0cadc428de6362b29f6 Mon Sep 17 00:00:00 2001 From: zfeixiang Date: Mon, 28 Jul 2025 08:39:35 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zfeixiang --- README_zh.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README_zh.md b/README_zh.md index 64bb4b8..0db2c24 100644 --- a/README_zh.md +++ b/README_zh.md @@ -46,8 +46,8 @@ | int32_t EnforceCodeSignForApp(const std::string &path, const EntryMap &entryPathMap, FileType type, uint32_t flag); | 对hap使能代码签名 | | int32_t EnforceCodeSignForFile(const std::string &path, const ByteBuffer &signature); | 对文件使能代码签名 | | int32_t EnforceCodeSignForFile(const std::string &path); | 对二进制文件使能代码签名 | -| int32_t EnforceCodeSignForAppWithOwnerId(std::string ownerId, const std::string &path, const EntryMap &entryPathMap, FileType type, uint32_t flag); | 对hap使能代码签名和OwnerId校验 | -| int32_t EnforceCodeSignForAppWithPluginId(std::string ownerId, std::string pluginId, const std::string &path, const EntryMap &entryPathMap, FileType type, uint32_t flag); | 对hap使能代码签名、OwnerId和PluginId校验 | +| int32_t EnforceCodeSignForAppWithOwnerId(const std::string ownerId, const std::string &path, const EntryMap &entryPathMap, FileType type, uint32_t flag); | 对hap使能代码签名和OwnerId校验 | +| int32_t EnforceCodeSignForAppWithPluginId(const std::string ownerId, const std::string pluginId, const std::string &path, const EntryMap &entryPathMap, FileType type, uint32_t flag); | 对hap使能代码签名、OwnerId和PluginId校验 | | 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); | 撤销已信任的开发者证书 | @@ -58,16 +58,16 @@ | int32_t SignLocalCode(const std::string &ownerID, const std::string &filePath, ByteBuffer &signature); | 带OwnerId的本地代码签名 | | int InitXpm(int enableJitFort, uint32_t idType, const char *ownerId, const char *apiTargetVersionStr); | 初始化XPM相关资源(XPM地址范围、JitFort模式、OwnerId配置等)| | int SetXpmOwnerId(uint32_t idType, const char *ownerId); | 设置OwnerId | -| int32_t RegisterTmpBuffer(JitCodeSignerBase *signer, void *tmpBuffer); | 注册临时Buffer起始地址 | -| int32_t AppendInstruction(JitCodeSignerBase *signer, Instr instr); | 对添加到临时Buffer的指令签名 | -| int32_t AppendData(JitCodeSignerBase *signer, const void *const data, uint32_t size); | 对添加到临时Buffer的数据签名 | -| int32_t WillFixUp(JitCodeSignerBase *signer, uint32_t n = 1); | 声明下n条指令待更新 | -| int32_t PatchInstruction(JitCodeSignerBase *signer, int offset, Instr instr); | 更新缓冲区的偏移处指令签名 | -| int32_t PatchInstruction(JitCodeSignerBase *signer, void *address, Instr insn); | 更新对应地址指令签名 | -| int32_t PatchData(JitCodeSignerBase *signer, int offset, const void *const data, uint32_t size); | 更新缓冲区偏移处数据签名 | -| int32_t PatchData(JitCodeSignerBase *signer, void *address, const void *const data, uint32_t size); | 更新对应地址数据签名 | +| int32_t RegisterTmpBuffer(JitCodeSigner *signer, void *tmpBuffer); | 注册临时Buffer起始地址 | +| int32_t AppendInstruction(JitCodeSigner *signer, Instr instr); | 对添加到临时Buffer的指令签名 | +| int32_t AppendData(JitCodeSigner *signer, const void *const data, uint32_t size); | 对添加到临时Buffer的数据签名 | +| int32_t WillFixUp(JitCodeSigner *signer, uint32_t n = 1); | 声明下n条指令待更新 | +| int32_t PatchInstruction(JitCodeSigner *signer, int offset, Instr instr); | 更新缓冲区的偏移处指令签名 | +| int32_t PatchInstruction(JitCodeSigner *signer, void *address, Instr insn); | 更新对应地址指令签名 | +| int32_t PatchData(JitCodeSigner *signer, int offset, const void *const data, uint32_t size); | 更新缓冲区偏移处数据签名 | +| int32_t PatchData(JitCodeSigner *signer, void *address, const void *const data, uint32_t size); | 更新对应地址数据签名 | | int32_t ResetJitCode(void *jitMemory, int size); | 重置JIT内存 | -| int32_t CopyToJitCode(JitCodeSignerBase *signer, void *jitMemory, void *tmpBuffer, int size); | 将JIT代码复制到JIT内存 | +| int32_t CopyToJitCode(JitCodeSigner *signer, void *jitMemory, void *tmpBuffer, int size); | 将JIT代码复制到JIT内存 | ### 签名工具使用指南 -- Gitee