nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ lwm2m_security_set_certificate()

int lwm2m_security_set_certificate ( uint16_t sec_obj_inst,
const void * cert,
int cert_len,
const void * private_key,
int key_len,
const void * ca_chain,
int ca_len )

#include <include/net/lwm2m_client_utils.h>

Set security object to certificate 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.

Parameters
sec_obj_instSecurity object ID to modify.
certPointer to certificate.
cert_lenCertificate length.
private_keyPointer to private key.
key_lenPrivate key length.
ca_chainPointer to CA certificate or server certificate.
ca_lenCA chain length.
Returns
Zero if success, negative error code otherwise.