From 371fc357a6a717cd59df46a73ac247220c6da22f Mon Sep 17 00:00:00 2001 From: CheungVane Date: Tue, 5 Dec 2023 14:32:11 +0800 Subject: [PATCH 1/4] add device password set tags Signed-off-by: zhangwenzhi --- security/huks/include/native_huks_type.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index 6dcaa7a8c..9ae5d64e8 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -398,6 +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, + + /** Device password is required but not set. */ + OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET = 12000016, }; /** @@ -625,6 +628,11 @@ enum OH_Huks_Tag { OH_HUKS_TAG_IS_ASYNCHRONIZED = OH_HUKS_TAG_TYPE_UINT | 1008, /** Key domain. */ OH_HUKS_TAG_KEY_DOMAIN = OH_HUKS_TAG_TYPE_UINT | 1011, + /** + * Key access control based on device password setting status. + * True means the key can only be generated and used when the password is set. + */ + OH_HUKS_TAG_IS_DEVICE_PASSWORD_SET = OH_HUKS_TAG_TYPE_BOOL | 1012, /** Authenticated Encryption. */ OH_HUKS_TAG_AE_TAG = OH_HUKS_TAG_TYPE_BYTES | 10009, -- Gitee From a583f157c2ccdb4f5ed35fb9687fb7bf1868bfaf Mon Sep 17 00:00:00 2001 From: CheungVane Date: Tue, 5 Dec 2023 17:17:21 +0800 Subject: [PATCH 2/4] add since 11 Signed-off-by: zhangwenzhi --- security/huks/include/native_huks_type.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index 9ae5d64e8..434eff797 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -399,7 +399,10 @@ enum OH_Huks_ErrCode { /** The authentication credential does not exist. */ OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013, - /** Device password is required but not set. */ + /** Device password is required but not set. + * + * @since 11 + */ OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET = 12000016, }; @@ -631,6 +634,8 @@ enum OH_Huks_Tag { /** * Key access control based on device password setting status. * True means the key can only be generated and used when the password is set. + * + * @since 11 */ OH_HUKS_TAG_IS_DEVICE_PASSWORD_SET = OH_HUKS_TAG_TYPE_BOOL | 1012, -- Gitee From 90d4aa468b95ce9ea165abde60b412208faee0e7 Mon Sep 17 00:00:00 2001 From: CheungVane Date: Tue, 5 Dec 2023 17:21:44 +0800 Subject: [PATCH 3/4] add blank Signed-off-by: zhangwenzhi --- security/huks/include/native_huks_type.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index 434eff797..1c726dfae 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -399,7 +399,8 @@ enum OH_Huks_ErrCode { /** The authentication credential does not exist. */ OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013, - /** Device password is required but not set. + /** + * Device password is required but not set. * * @since 11 */ -- Gitee From a3360afc9e22257a68866ab69d01cf3c97dca2ee Mon Sep 17 00:00:00 2001 From: CheungVane Date: Thu, 14 Dec 2023 15:17:49 +0800 Subject: [PATCH 4/4] remove redundant blank Signed-off-by: zhangwenzhi --- security/huks/include/native_huks_type.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/security/huks/include/native_huks_type.h b/security/huks/include/native_huks_type.h index 1c726dfae..29143fe5c 100644 --- a/security/huks/include/native_huks_type.h +++ b/security/huks/include/native_huks_type.h @@ -399,9 +399,9 @@ enum OH_Huks_ErrCode { /** The authentication credential does not exist. */ OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013, - /** - * Device password is required but not set. - * + /** + * Device password is required but not set. + * * @since 11 */ OH_HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET = 12000016, @@ -635,7 +635,7 @@ enum OH_Huks_Tag { /** * Key access control based on device password setting status. * True means the key can only be generated and used when the password is set. - * + * * @since 11 */ OH_HUKS_TAG_IS_DEVICE_PASSWORD_SET = OH_HUKS_TAG_TYPE_BOOL | 1012, -- Gitee