CPC-Security#
Modules#
sl_cpc_unbind_notification_handle_t
Enumerations#
Enumeration representing security state.
Typedefs#
Typedef for the user-supplied callback function, which is called when unbinding (authorized).
Functions#
Get the setup status of the security subsystem.
User callback to provide CPC with a binding key.
Authorize an unbind request.
Unbind device.
Register a callback that will be called when an unbind event occurs.
Unregister a callback that will be called when an unbind event occurs.
Enumeration Documentation#
sl_cpc_security_state_t#
sl_cpc_security_state_t
Enumeration representing security state.
Enumerator | |
---|---|
SL_CPC_SECURITY_STATE_NOT_READY | Security is not yet setup, no I-frame allowed. |
SL_CPC_SECURITY_STATE_DISABLED | Security is not enabled, cleartext I-frame are allowed. |
SL_CPC_SECURITY_STATE_INITIALIZING | Security is being initialized, raw I-frame are only allowed on security endpoint. |
SL_CPC_SECURITY_STATE_RESETTING | Security is being reset. |
SL_CPC_SECURITY_STATE_WAITING_ON_TX_COMPLETE | Response to setup the security session is about to be sent, waiting for write completion. |
SL_CPC_SECURITY_STATE_INITIALIZED | Security is initialized, only encrypted I-frame are allowed. |
Typedef Documentation#
sl_cpc_unbind_notification_t#
typedef void(* sl_cpc_unbind_notification_t) (void *data) )(void *data)
Typedef for the user-supplied callback function, which is called when unbinding (authorized).
Type | Direction | Argument Name | Description |
---|---|---|---|
N/A | data | User-specific argument. |
Function Documentation#
sl_cpc_security_get_state#
sl_cpc_security_state_t sl_cpc_security_get_state (void )
Get the setup status of the security subsystem.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Returns
The setup status of the security subsystem.
sl_cpc_security_fetch_user_specified_binding_key#
void sl_cpc_security_fetch_user_specified_binding_key (uint8_t ** key, uint16_t * key_size_in_bytes)
User callback to provide CPC with a binding key.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t ** | [out] | key | The encryption key |
uint16_t * | [out] | key_size_in_bytes | The encryption key size Note: Only 16 bytes keys are supported for the moment |
SL_CPC_SECURITY_BINDING_KEY_METHOD config must be set to SL_CPC_SECURITY_BINDING_KEY_CUSTOMER_SPECIFIC
sl_cpc_security_on_unbind_request#
uint64_t sl_cpc_security_on_unbind_request (bool is_link_encrypted)
Authorize an unbind request.
Type | Direction | Argument Name | Description |
---|---|---|---|
bool | N/A | is_link_encrypted |
Note
Declared as a weak symbol. If no strong definition is given by the user, unbind requests are always denied. If the user gives sl_cpc_security_fetch_user_specified_binding_key definition for this function, its return value will dictate if unbind requests are accepted.
Returns
Whether to allow unbind or not, use SL_CPC_SECURITY_OK_TO_UNBIND as a return value to allow. Return anything else to deny.
sl_cpc_security_unbind#
sl_status_t sl_cpc_security_unbind (void )
Unbind device.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Returns
Status code.
sl_cpc_security_unbind_subscribe#
sl_status_t sl_cpc_security_unbind_subscribe (sl_cpc_unbind_notification_handle_t * handle, sl_cpc_unbind_notification_t callback, void * data)
Register a callback that will be called when an unbind event occurs.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_cpc_unbind_notification_handle_t * | [in] | handle | pointer to the unbind notification handle. |
sl_cpc_unbind_notification_t | [in] | callback | pointer to the unbind notification callback. |
void * | [in] | data | pointer to pass to the unbind notification callback. |
Returns
Status code.
sl_cpc_security_unbind_unsubscribe#
sl_status_t sl_cpc_security_unbind_unsubscribe (sl_cpc_unbind_notification_handle_t * handle)
Unregister a callback that will be called when an unbind event occurs.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_cpc_unbind_notification_handle_t * | [in] | handle | pointer to the unbind notification handle. |
Returns
Status code.