nRF Connect SDK API 2.8.0
|
int lwm2m_security_set_psk | ( | uint16_t | sec_obj_inst, |
const void * | psk, | ||
int | psk_len, | ||
bool | psk_is_hex, | ||
const char * | psk_id ) |
#include <include/net/lwm2m_client_utils.h>
Set security object to PSK mode.
Any pointer can be given as a NULL, which means that data related to this field is set to zero length in the engine. Effectively, it causes that relative data is not written into the modem. This can be used if the given data is already provisioned to the modem.
sec_obj_inst | Security object ID to modify. |
psk | Pointer to PSK key, either in HEX or binary format. |
psk_len | Length of data in PSK pointer. If PSK is HEX string, should include string terminator. |
psk_is_hex | True if PSK points to data in HEX format. False if the data is binary. |
psk_id | PSK key ID in string format. |