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

◆ modem_key_mgmt_read()

int modem_key_mgmt_read ( nrf_sec_tag_t  sec_tag,
enum modem_key_mgmt_cred_type  cred_type,
void *  buf,
size_t *  len 
)

#include <include/modem/modem_key_mgmt.h>

Read a credential from persistent storage.

Parameters
[in]sec_tagThe security tag of the credential.
[in]cred_typeThe credential type.
[out]bufBuffer to read the credential into.
[in,out]lenLength of the buffer, length of the credential.
Return values
0On success.
-ENOBUFSInternal buffer is too small.
-ENOMEMCredential does not fit in buf.
-ENOENTNo credential associated with the given sec_tag and cred_type.
-EACCESAccess to credential not allowed.