#include <include/modem/modem_key_mgmt.h>
Read a credential from persistent storage.
- Parameters
-
| [in] | sec_tag | The security tag of the credential. |
| [in] | cred_type | The credential type. |
| [out] | buf | Buffer to read the credential into. |
| [in,out] | len | Length of the buffer, length of the credential. |
- Return values
-
| 0 | On success. |
| -ENOBUFS | Internal buffer is too small. |
| -ENOMEM | Credential does not fit in buf. Check *len for required size. |
| -ENOENT | No credential associated with the given sec_tag and cred_type. |
| -EACCES | Access to credential not allowed. |
| -E2BIG | Memory failure. |