![]() |
nRF Connect SDK API 3.3.99
|
| int modem_key_mgmt_write | ( | nrf_sec_tag_t | sec_tag, |
| enum modem_key_mgmt_cred_type | cred_type, | ||
| const void * | buf, | ||
| size_t | len ) |
#include <include/modem/modem_key_mgmt.h>
Write or update a credential in persistent storage.
Store the credential and associate it with the given security tag, which can later be used to access it.
| [in] | sec_tag | Security tag to associate with this credential. |
| [in] | cred_type | The credential type. |
| [in] | buf | Buffer containing the credential data. |
| [in] | len | Length of the buffer. |
| 0 | On success. |
| -EINVAL | Invalid parameters. |
| -ENOMEM | Not enough memory to store the credential. |
| -ENOENT | The security tag sec_tag is invalid. |
| -EACCES | Access to credential not allowed. |
| -EALREADY | Credential already exists (and can't be overwritten). |
| -EPERM | Not permitted when the LTE link is active. |
| -ECANCELED | Canceled because voltage is low (power off warning). |