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. |
62
of file platform/service/cpc/inc/sl_cpc_security.h
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).
N/A | data | User-specific argument. |
78
of file platform/service/cpc/inc/sl_cpc_security.h
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.
N/A |
Returns
The setup status of the security subsystem.
97
of file platform/service/cpc/inc/sl_cpc_security.h
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.
[out] | key | The encryption key |
[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
109
of file platform/service/cpc/inc/sl_cpc_security.h
sl_cpc_security_on_unbind_request#
uint64_t sl_cpc_security_on_unbind_request (bool is_link_encrypted)
Authorize an unbind request.
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.
124
of file platform/service/cpc/inc/sl_cpc_security.h
sl_cpc_security_unbind#
sl_status_t sl_cpc_security_unbind (void )
Unbind device.
N/A |
Returns
Status code.
131
of file platform/service/cpc/inc/sl_cpc_security.h
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.
[in] | handle | pointer to the unbind notification handle. |
[in] | callback | pointer to the unbind notification callback. |
[in] | data | pointer to pass to the unbind notification callback. |
Returns
Status code.
142
of file platform/service/cpc/inc/sl_cpc_security.h
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.
[in] | handle | pointer to the unbind notification handle. |
Returns
Status code.
153
of file platform/service/cpc/inc/sl_cpc_security.h