代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony-Retired/security_interfaces_innerkits_app_verify 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* Copyright (c) 2020 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef SECURITY_APP_VERIFY_PUB_H
#define SECURITY_APP_VERIFY_PUB_H
#include <stdlib.h>
#include <stdbool.h>
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
typedef enum {
V_OK = 0,
/* begin app sign parse */
V_ERR_GET_CERT_INFO = 0xef000002,
V_ERR_UNTRUSTED_CERT = 0xef000003,
V_ERR_INTEGRITY = 0xef000004,
V_ERR_GET_SIGNHEAD = 0xef000005,
V_ERR_GET_SIGN_BLOCK = 0xef000006,
V_ERR_GET_HASH_DIFF = 0xef000007,
V_ERR_INVALID_CONTENT_TAG = 0xef000008,
V_ERR_INVALID_HASH_ALG = 0xef000009,
V_ERR_GET_ROOT_HASH = 0xef00000a,
V_ERR_CALC_BLOCK_HASH = 0xef00000c,
V_ERR_PARSE_PKC7_DATA = 0xef00000d,
V_ERR_VERIFY_CERT_CHAIN = 0xef00000e,
V_ERR_VERIFY_SIGNATURE = 0xef00000f,
V_ERR_GET_CERT_TYPE = 0xef000010,
/* begin profile signparse */
V_ERR_GET_PROFILE_DATA = 0xef000011,
V_ERR_GET_PARSE_PROFILE = 0xef000012,
V_ERR_PROF_CONTENT_INVALID = 0xef000013,
V_ERR_VERFIY_PROF_CERT = 0xef000014,
V_ERR_GET_CERT_PK = 0xef000015,
V_ERR_GET_APPID = 0xef000016,
V_ERR_INVALID_DISP_TYPE = 0xef000017,
V_ERR_INVALID_APP_BUNDLE = 0xef000018,
V_ERR_INVALID_DATE = 0xef000019,
V_ERR_INVALID_DEVID = 0xef00001a,
/* begin file operation */
V_ERR_FILE_OPEN = 0xef00001b,
V_ERR_FILE_STAT = 0xef00001c,
V_ERR_FILE_LENGTH = 0xef00001d,
/* begin memory operation */
V_ERR_MEMSET = 0xef00001e,
V_ERR_MEMCPY = 0xef00001f,
V_ERR_MALLOC = 0xef000020,
/* default error */
V_ERR = 0xffffffff,
} AppVErrCode;
typedef struct {
int notBefore;
int notAfter;
} ProfValidity;
typedef struct {
char *developerId; /* developer-id */
unsigned char *devCert; /* development-certificate */
unsigned char *releaseCert; /* distribution-certificate */
char *bundleName; /* bundle-name */
char *appFeature; /* app-feature : hos_system_app/hos_normal_app */
} ProfBundleInfo;
typedef struct {
int restricNum;
char **restricPermission;
int permissionNum;
char **permission;
} ProfPermission;
typedef struct {
char *devIdType;
int devidNum;
char **deviceId;
} ProfDebugInfo;
typedef struct {
int versionCode; /* version */
char *versionName; /* version description */
char *uuid; /* uuid */
char *type; /* debug/release */
char *appDistType; /* app-distribution-type */
ProfValidity validity; /* validity */
ProfBundleInfo bundleInfo; /* bundle-info */
ProfPermission permission; /* permissions */
ProfDebugInfo debugInfo; /* debug-info */
char *issuer; /* issuer */
char *appid; /* bundle_name_pk(base64) */
} ProfileProf;
typedef struct {
char *pk;
int len;
} AppSignPk;
struct VfyRst;
typedef int (*GetSignPk)(struct VfyRst *verifyRst, AppSignPk *pk);
typedef void (*FreeSignPK)(AppSignPk *pk);
typedef struct VfyRst {
ProfileProf profile; /* profile */
} VerifyResult;
/* verify app integrity, return 0 if OK, otherwise errcode AppVErrCode */
int APPVERI_AppVerify(const char *filePath, VerifyResult *verifyRst);
/* free the verify result of APPVERI_AppVerify returned */
void APPVERI_FreeVerifyRst(VerifyResult *verifyRst);
/* set debugmode */
int APPVERI_SetDebugMode(bool mode);
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。