|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
Model for the brand protection record. More...
Go to the source code of this file.
Macros | |
| #define | IFX_RECORD_BP_SET UINT8_C(0x01) |
| Identifier for model set brand protection record ID. | |
| #define | IFX_RECORD_BP_GET UINT8_C(0x02) |
| Identifier for model get brand protection record ID. | |
| #define | IFX_RECORD_BP_NEW UINT8_C(0x03) |
| Identifier for model new brand protection record ID. | |
| #define | IFX_RECORD_BP_RELEASE_MEMORY UINT8_C(0x04) |
| Identifier for model brand protection record release memory. | |
| #define | IFX_RECORD_BP_TYPE_LEN UINT8_C(0x20) |
| Type length for brand protection. | |
| #define | IFX_RECORD_BP_TYPE |
| Type of brand protection record: "infineon.com:nfc-bridge-tag.x509". | |
| #define | IFX_BP_CERT_HANDLERS_NOT_DEFINED UINT8_C(0x01) |
| Error ID for undefined certificate handler error. | |
Typedefs | |
| typedef ifx_status_t(* | ifx_record_bp_cert_encoder_t) (const void *, ifx_blob_t **) |
| Function prototype declaration for certificate encoding function. | |
| typedef ifx_status_t(* | ifx_record_bp_cert_decoder_t) (const ifx_blob_t *, void *) |
| Function prototype declaration for certificate decoding function. | |
Functions | |
| ifx_status_t | ifx_record_bp_new (ifx_record_handle_t *handle) |
| Creates a new brand protection record and the respective handle for the record. This handle can be used for encoding and decoding operations. | |
| ifx_status_t | ifx_record_bp_register (void) |
| Registers the brand protection record with the NDEF library. Only the registered records are encoded and decoded by the NDEF library. | |
| ifx_status_t | ifx_record_bp_set_certificate_handlers (ifx_record_handle_t *handle, ifx_record_bp_cert_encoder_t encoder, ifx_record_bp_cert_decoder_t decoder) |
| Sets the certificate encoder and decoder callback functions for parsing certificates. | |
| ifx_status_t | ifx_record_bp_set_certificate (ifx_record_handle_t *handle, const void *certificate) |
| Sets certificate in the brand protection record for a given record handle. | |
| ifx_status_t | ifx_record_bp_get_certificate (const ifx_record_handle_t *handle, void *certificate) |
| Gets the certificate from the brand protection record handle. | |
| ifx_status_t | ifx_record_bp_set_payload (ifx_record_handle_t *handle, const ifx_blob_t *payload) |
| Sets the payload in brand protection record handle. | |
| ifx_status_t | ifx_record_bp_get_payload (const ifx_record_handle_t *handle, ifx_blob_t *payload) |
| Gets the payload from the brand protection record handle. | |
Model for the brand protection record.
Definition in file ifx-record-bp.h.
| #define IFX_BP_CERT_HANDLERS_NOT_DEFINED UINT8_C(0x01) |
Error ID for undefined certificate handler error.
Definition at line 57 of file ifx-record-bp.h.
| #define IFX_RECORD_BP_GET UINT8_C(0x02) |
Identifier for model get brand protection record ID.
Definition at line 29 of file ifx-record-bp.h.
| #define IFX_RECORD_BP_NEW UINT8_C(0x03) |
Identifier for model new brand protection record ID.
Definition at line 34 of file ifx-record-bp.h.
| #define IFX_RECORD_BP_RELEASE_MEMORY UINT8_C(0x04) |
Identifier for model brand protection record release memory.
Definition at line 39 of file ifx-record-bp.h.
| #define IFX_RECORD_BP_SET UINT8_C(0x01) |
Identifier for model set brand protection record ID.
Definition at line 24 of file ifx-record-bp.h.
| #define IFX_RECORD_BP_TYPE |
Type of brand protection record: "infineon.com:nfc-bridge-tag.x509".
Definition at line 49 of file ifx-record-bp.h.
| #define IFX_RECORD_BP_TYPE_LEN UINT8_C(0x20) |
Type length for brand protection.
Definition at line 44 of file ifx-record-bp.h.
| typedef ifx_status_t(* ifx_record_bp_cert_decoder_t) (const ifx_blob_t *, void *) |
Function prototype declaration for certificate decoding function.
Definition at line 68 of file ifx-record-bp.h.
| typedef ifx_status_t(* ifx_record_bp_cert_encoder_t) (const void *, ifx_blob_t **) |
Function prototype declaration for certificate encoding function.
Definition at line 62 of file ifx-record-bp.h.
| ifx_status_t ifx_record_bp_get_certificate | ( | const ifx_record_handle_t * | handle, |
| void * | certificate ) |
Gets the certificate from the brand protection record handle.
| [in] | handle | Pointer to the record handle |
| [out] | certificate | Pointer to the certificate |
| IFX_SUCCESS | If the certificate get operation is successful |
| NDEF_ERROR_INVALID_RECORD | If the record handle is not a brand protection type |
| IFX_ILLEGAL_ARGUMENT | If input parameters are NULL or invalid |
| ifx_status_t ifx_record_bp_get_payload | ( | const ifx_record_handle_t * | handle, |
| ifx_blob_t * | payload ) |
Gets the payload from the brand protection record handle.
| [in] | handle | Pointer to the record handle |
| [out] | payload | Pointer to the payload |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If input parameters are NULL or invalid |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| ifx_status_t ifx_record_bp_new | ( | ifx_record_handle_t * | handle | ) |
Creates a new brand protection record and the respective handle for the record. This handle can be used for encoding and decoding operations.
| [out] | handle | Handle of the created brand protection record |
| IFX_SUCCESS | If new record creation is successful |
| IFX_ILLEGAL_ARGUMENT | In case of NULL init_handler |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| ifx_status_t ifx_record_bp_register | ( | void | ) |
Registers the brand protection record with the NDEF library. Only the registered records are encoded and decoded by the NDEF library.
| IFX_SUCCESS | If init_handler is registered properly to the record init_handler list |
| IFX_RECORD_INFO_ALREADY_REGISTERED | If the same record type is already registered |
| IFX_ILLEGAL_ARGUMENT | In case of NULL init_handler |
| IFX_OUT_OF_MEMORY | If memory allocation fails |
| ifx_status_t ifx_record_bp_set_certificate | ( | ifx_record_handle_t * | handle, |
| const void * | certificate ) |
Sets certificate in the brand protection record for a given record handle.
| [out] | handle | Pointer to record handle |
| [in] | certificate | Pointer to certificate |
| IFX_SUCCESS | If the certificate set operation is successful |
| NDEF_ERROR_INVALID_RECORD | If the record handle is not a brand protection type |
| IFX_ILLEGAL_ARGUMENT | If input parameters are NULL or invalid |
| ifx_status_t ifx_record_bp_set_certificate_handlers | ( | ifx_record_handle_t * | handle, |
| ifx_record_bp_cert_encoder_t | encoder, | ||
| ifx_record_bp_cert_decoder_t | decoder ) |
Sets the certificate encoder and decoder callback functions for parsing certificates.
| [out] | handle | Pointer to the record handle |
| [in] | encoder | Callback function to encode certificate |
| [in] | decoder | Callback function to decode certificate |
| IFX_SUCCESS | If the certificate parser set operation is successful |
| NDEF_ERROR_INVALID_RECORD | If the record handle is not a brand protection type |
| IFX_ILLEGAL_ARGUMENT | If input parameters are NULL or invalid |
| ifx_status_t ifx_record_bp_set_payload | ( | ifx_record_handle_t * | handle, |
| const ifx_blob_t * | payload ) |
Sets the payload in brand protection record handle.
| [in,out] | handle | Pointer to the record handle |
| [in] | payload | Pointer to the payload |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If input parameters are NULL or invalid |
| IFX_OUT_OF_MEMORY | If memory allocation fails |