openharmony 鸿蒙 capi-cm-native-type-h

2026-08-25 浏览 (1)

cm_native_type.h

Overview

Provides the enums, structs, macros, and error codes used by CertManager APIs.

Header file: <device_certificate/certmanager/cm_native_type.h>

Library: libohcert_manager.so

System capability: SystemCapability.Security.CertificateManager

Since: 22

Related module: CertManagerType

Summary

Structs

Nametypedef KeywordDescription
OH_CM_BlobOH_CM_BlobDefines a struct for a binary large object (BLOB).
OH_CM_CredentialOH_CM_CredentialDefines a struct for the certificate credential details.
OH_CM_CredentialDetailListOH_CM_CredentialDetailListDefines a struct for the certificate credential detail list.
OH_CM_UkeyInfoOH_CM_UkeyInfoDefines a struct for the USB certificate credential information.

Enums

Nametypedef KeywordDescription
OH_CM_ErrorCodeOH_CM_ErrorCodeEnumerates error codes.
OH_CM_CertificatePurposeOH_CM_CertificatePurposeEnumerates the certificate credential purposes.

Macros

NameDescription
OH_CM_MAX_LEN_CERTIFICATE_CHAIN 24588Maximum length of a certificate chain.
Since: 22
OH_CM_MAX_LEN_URI 256Maximum length of a URI.
Since: 22
OH_CM_MAX_LEN_CERT_ALIAS 129Maximum length of a certificate alias.
Since: 22
OH_CM_MAX_LEN_TYPE_NAME 1025Maximum length of a certificate type.
Since: 22

Enum Description

OH_CM_ErrorCode

enum OH_CM_ErrorCode

Description

Enumerates error codes.

Since: 22

Enum ItemDescription
OH_CM_SUCCESS = 0Operation succeeded.
OH_CM_HAS_NO_PERMISSION = 201Permission verification failed.
OH_CM_CAPABILITY_NOT_SUPPORTED = 801Not supported by the device.
OH_CM_INNER_FAILURE = 17500001Internal error. Possible causes: 1. IPC failure. 2. Memory operation error. 3. File operation error.
OH_CM_NOT_FOUND = 17500002The certificate does not exist.
OH_CM_INVALID_CERT_FORMAT = 17500003The keystore format is invalid or the keystore password is incorrect.
OH_CM_MAX_CERT_COUNT_REACHED = 17500004The number of certificates or credentials reaches the upper limit.
OH_CM_NO_AUTHORIZATION = 17500005The application is not authorized.
OH_CM_DEVICE_ENTER_ADVSECMODE = 17500007The device enters the advanced security mode.
OH_CM_STORE_PATH_NOT_SUPPORTED = 17500009The device does not support the specified certificate storage path.
OH_CM_ACCESS_UKEY_SERVICE_FAILED = 17500010Failed to access the USB certificate credential.
OH_CM_PARAMETER_VALIDATION_FAILED = 17500011Parameter verification fails. For example, the parameter format or range is invalid.

OH_CM_CertificatePurpose

enum OH_CM_CertificatePurpose

Description

Enumerates the certificate credential purposes.

Since: 22

Enum ItemDescription
OH_CM_CERT_PURPOSE_DEFAULT = 0Default purpose, which is used for credential signing.
OH_CM_CERT_PURPOSE_ALL = 1All purposes, which are used to query credential functionalities.
OH_CM_CERT_PURPOSE_SIGN = 2Signing purpose.
OH_CM_CERT_PURPOSE_ENCRYPT = 3Encryption purpose.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-cm-native-api-h

openharmony 鸿蒙 capi-certmanagertype

openharmony 鸿蒙 js-apis-certManagerDialog

openharmony 鸿蒙 errorcode-certManager

openharmony 鸿蒙 capi-certmanagertype-oh-cm-credentialdetaillist

openharmony 鸿蒙 errorcode-cert

openharmony 鸿蒙 Readme-EN

openharmony 鸿蒙 capi-certmanagertype-oh-cm-blob

openharmony 鸿蒙 js-apis-certManager

openharmony 鸿蒙 capi-certmanagertype-oh-cm-credential

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/Pj5T1ack