问题1: 调用SafetyDetect的checkSysIntegrity接口失败,返回1010800001 - Internal error
代码:文档原有例子
import { safetyDetect } from '@kit.DeviceSecurityKit';
import { BusinessError} from '@kit.BasicServicesKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
// 请求设备完整性检测,并处理结果
let req : safetyDetect.SysIntegrityRequest = {
nonce : 'imEe1PCRcjGkBCAhOCh6ImADztOZ8ygxlWRs' // 从服务器生成的随机的nonce值
};
try {
hilog.info(0x0000, TAG, 'CheckSysIntegrity begin.');
const data: safetyDetect.SysIntegrityResponse = await safetyDetect.checkSysIntegrity(req);
hilog.info(0x0000, TAG, 'Succeeded in checkSysIntegrity: %{public}s', data.result);
} catch (err) {
let e: BusinessError = err as BusinessError;
hilog.error(0x0000, TAG, 'CheckSysIntegrity failed: %{public}d %{public}s', e.code, e.message);
}
问题2:完整性检测结果,最后要去华为服务端进行真实性确认,这部分文档没找到。
问题3: HarmonyOS Next中何时能够实现HMS Core相关API,例如:
1)恶意应用检测
2)虚假用户检测
3)恶意WI-FI检测
4)恶意URL检测
问题1:需要升级到beta版本验证
问题2、3:上架检测的标准是依据https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/experience-suggestions-security-V5,HarmonyOS提供了部分检测能力https://cn.devecostudio.huawei.com/cn/,其余检测内容需要人工介入或难以工程化,在应用上架的时候会进行全量检测