Wi-Fi Credential#

Functions#

sl_status_t
sl_wifi_set_credential(sl_wifi_credential_id_t id, sl_wifi_credential_type_t type, const void *credential, uint32_t credential_length)

Store a credential in specified credential identifier.

sl_status_t
sl_wifi_get_credential(sl_wifi_credential_id_t id, sl_wifi_credential_type_t *type, void *credential, uint32_t *credential_length)

Retrieve a stored credential.

sl_status_t
sl_wifi_delete_credential(sl_wifi_credential_id_t id)

Delete a stored credential.

Function Documentation#

sl_wifi_set_credential#

sl_status_t sl_wifi_set_credential (sl_wifi_credential_id_t id, sl_wifi_credential_type_t type, const void * credential, uint32_t credential_length)

Store a credential in specified credential identifier.

Parameters
[in]id

Credential identifier as identified by sl_wifi_credential_id_t.

[in]type

Credential type as identified by sl_wifi_credential_type_t.

[in]credential

Pointer to the credential data object.

[in]credential_length

Length of the credential data object.

This function stores the credential type and data for the specified credential ID. The credential data can include client credentials, access point credentials and user credentials (user credential is a generic credential identifier that can be configured to represent a specific credential type, such as TLS, MQTT, or HTTP, based on the chosen protocol).

Repeatedly calling this API with the same ID will overwrite the existing credential type and data.

  • Pre-conditions:

Returns


Definition at line 68 of file components/protocol/wifi/inc/sl_wifi_credentials.h

sl_wifi_get_credential#

sl_status_t sl_wifi_get_credential (sl_wifi_credential_id_t id, sl_wifi_credential_type_t * type, void * credential, uint32_t * credential_length)

Retrieve a stored credential.

Parameters
[in]id

Credential identifier as identified by sl_wifi_credential_id_t.

[out]type

Credential type as identified by sl_wifi_credential_type_t.

[out]credential

Pointer to location where credential data is stored.

[inout]credential_length

in: Number of bytes available at credential. out: Number of bytes written.

This function retrieves the credential data for the specified credential ID. The retrieved credential data is stored in the provided credential object.

  • Pre-conditions:

Returns


Definition at line 100 of file components/protocol/wifi/inc/sl_wifi_credentials.h

sl_wifi_delete_credential#

sl_status_t sl_wifi_delete_credential (sl_wifi_credential_id_t id)

Delete a stored credential.

Parameters
[in]id

Credential identifier as identified by sl_wifi_credential_id_t.

This function deletes the credential data for the specific credential ID and type. Once deleted, the credential cannot be used further for any operations.

  • Pre-conditions:

Returns


Definition at line 123 of file components/protocol/wifi/inc/sl_wifi_credentials.h