CPC-Security#

Modules#

sl_cpc_unbind_notification_handle_t

Enumerations#

enum
SL_CPC_SECURITY_STATE_NOT_READY = 0x00
SL_CPC_SECURITY_STATE_DISABLED = 0x01
SL_CPC_SECURITY_STATE_INITIALIZING = 0x02
SL_CPC_SECURITY_STATE_RESETTING = 0x03
SL_CPC_SECURITY_STATE_WAITING_ON_TX_COMPLETE = 0x4
SL_CPC_SECURITY_STATE_INITIALIZED = 0x05
}

Enumeration representing security state.

Typedefs#

typedef void(*

Typedef for the user-supplied callback function, which is called when unbinding (authorized).

Functions#

Get the setup status of the security subsystem.

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.

uint64_t
sl_cpc_security_on_unbind_request(bool is_link_encrypted)

Authorize an unbind request.

sl_status_t

Unbind device.

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.

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.

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.


Definition at line 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).

Parameters
N/Adata

User-specific argument.


Definition at line 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.

Parameters
N/A

Returns

  • The setup status of the security subsystem.


Definition at line 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.

Parameters
[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


Definition at line 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.

Parameters
N/Ais_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.


Definition at line 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.

Parameters
N/A

Returns

  • Status code.


Definition at line 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.

Parameters
[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.


Definition at line 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.

Parameters
[in]handle

pointer to the unbind notification handle.

Returns

  • Status code.


Definition at line 153 of file platform/service/cpc/inc/sl_cpc_security.h