From 32aaea8904a93115d50e6e0581ab11e3acc0de6a Mon Sep 17 00:00:00 2001 From: ailu1 Date: Sun, 17 Dec 2023 17:02:17 +0800 Subject: [PATCH 1/2] add errcode and access type Signed-off-by: ailu1 --- security/huks/include/native_huks_type.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index d2fdbf7d1..c0c4d8de6 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -398,7 +398,18 @@ enum OH_Huks_ErrCode { OH_HUKS_ERR_CODE_INTERNAL_ERROR = 12000012, /** The authentication credential does not exist. */ OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013, - + /** + * The memory is not sufficient. + * + * @since 9 + */ + OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY = 12000014, + /** + * Failed to call service. + * + * @since 9 + */ + OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED = 12000015, /** * Device password is required but not set. * @@ -454,7 +465,13 @@ enum OH_Huks_AuthAccessType { /** The key is invalid after the password is cleared. */ OH_HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD = 1 << 0, /** The key is invalid after a new biometric feature is enrolled. */ - OH_HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 1 << 1 + OH_HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 1 << 1, + /** + * The key is always valid. + * + * @since 11 + */ + OH_HUKS_AUTH_ACCESS_ALWAYS_VALID = 1 << 2, }; /** -- Gitee From 23357ed09a10fb6712421d01a6d1c2efb243bef9 Mon Sep 17 00:00:00 2001 From: ailu1 Date: Sun, 17 Dec 2023 17:48:12 +0800 Subject: [PATCH 2/2] remove since Signed-off-by: ailu1 --- security/huks/include/native_huks_type.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index c0c4d8de6..5c261751e 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -398,17 +398,9 @@ enum OH_Huks_ErrCode { OH_HUKS_ERR_CODE_INTERNAL_ERROR = 12000012, /** The authentication credential does not exist. */ OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013, - /** - * The memory is not sufficient. - * - * @since 9 - */ + /** The memory is not sufficient. */ OH_HUKS_ERR_CODE_INSUFFICIENT_MEMORY = 12000014, - /** - * Failed to call service. - * - * @since 9 - */ + /** Failed to call service. */ OH_HUKS_ERR_CODE_CALL_SERVICE_FAILED = 12000015, /** * Device password is required but not set. -- Gitee