add fail ret_value to signature failure

Signed-off-by: ChenYC009 <chenyongchun5@huawei.com>
Change-Id: Ie2c98d3c625a352b3293f47ecf1dd0bf8dac8abf
This commit is contained in:
ChenYC009 2024-05-21 17:38:30 +08:00
parent a89916f5fc
commit 8a6bad3de8
2 changed files with 7 additions and 6 deletions

View File

@ -22,13 +22,14 @@
namespace OHOS::ArkCompiler {
enum {
ERR_OK = 0,
ERR_AOT_COMPILER_PARAM_FAILED,
ERR_AOT_COMPILER_CONNECT_FAILED,
ERR_AOT_COMPILER_CALL_FAILED,
ERR_AOT_COMPILER_SIGNATURE_FAILED,
ERR_AOT_COMPILER_OFFSET = 10000,
ERR_AOT_COMPILER_PARAM_FAILED = 10001,
ERR_AOT_COMPILER_CONNECT_FAILED = 10002,
ERR_AOT_COMPILER_CALL_FAILED = 10003,
ERR_AOT_COMPILER_SIGNATURE_FAILED = 10004,
ERR_OK_NO_AOT_FILE,
ERR_AOT_COMPILER_STOP_FAILED,
INVALID_ERR_CODE = 9999,
INVALID_ERR_CODE = 99999,
};
class AotCompilerErrorUtil {

View File

@ -190,7 +190,7 @@ int32_t AotCompilerImpl::AOTLocalCodeSign(const std::string &fileName, const std
if (Security::CodeSign::LocalCodeSignKit::SignLocalCode(appSignature, fileName, sig)
!= CommonErrCode::CS_SUCCESS) {
HiviewDFX::HiLog::Error(LABEL, "failed to sign the aot file");
return ERR_AOT_COMPILER_CALL_FAILED;
return ERR_AOT_COMPILER_SIGNATURE_FAILED;
}
HiviewDFX::HiLog::Debug(LABEL, "aot file local sign success");
uint8_t *dataPtr = sig.GetBuffer();