nRF Connect SDK API 2.8.0
Loading...
Searching...
No Matches
modem_key_mgmt.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef MODEM_KEY_MGMT_H__
8#define MODEM_KEY_MGMT_H__
9
10#include <stdbool.h>
11#include <stdint.h>
12
13#include <nrf_socket.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
34
58int modem_key_mgmt_write(nrf_sec_tag_t sec_tag,
59 enum modem_key_mgmt_cred_type cred_type,
60 const void *buf, size_t len);
61
79int modem_key_mgmt_delete(nrf_sec_tag_t sec_tag,
80 enum modem_key_mgmt_cred_type cred_type);
81
96int modem_key_mgmt_clear(nrf_sec_tag_t sec_tag);
97
115int modem_key_mgmt_read(nrf_sec_tag_t sec_tag,
116 enum modem_key_mgmt_cred_type cred_type,
117 void *buf, size_t *len);
118
134int modem_key_mgmt_cmp(nrf_sec_tag_t sec_tag,
135 enum modem_key_mgmt_cred_type cred_type,
136 const void *buf, size_t len);
137
150int modem_key_mgmt_exists(nrf_sec_tag_t sec_tag,
151 enum modem_key_mgmt_cred_type cred_type,
152 bool *exists);
153
156#ifdef __cplusplus
157}
158#endif
159
160#endif /* MODEM_KEY_MGMT_H__ */
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)
Write or update a credential in persistent storage.
int modem_key_mgmt_read(nrf_sec_tag_t sec_tag, enum modem_key_mgmt_cred_type cred_type, void *buf, size_t *len)
Read a credential from persistent storage.
int modem_key_mgmt_clear(nrf_sec_tag_t sec_tag)
Delete all credentials for a given sectag from persistent storage.
int modem_key_mgmt_delete(nrf_sec_tag_t sec_tag, enum modem_key_mgmt_cred_type cred_type)
Delete a credential from persistent storage.
int modem_key_mgmt_cmp(nrf_sec_tag_t sec_tag, enum modem_key_mgmt_cred_type cred_type, const void *buf, size_t len)
Compare a credential with a credential in persistent storage.
int modem_key_mgmt_exists(nrf_sec_tag_t sec_tag, enum modem_key_mgmt_cred_type cred_type, bool *exists)
Check if a credential exists in persistent storage.
modem_key_mgmt_cred_type
Credential types.
Definition modem_key_mgmt.h:27
@ MODEM_KEY_MGMT_CRED_TYPE_PRIVATE_CERT
Definition modem_key_mgmt.h:30
@ MODEM_KEY_MGMT_CRED_TYPE_IDENTITY
Definition modem_key_mgmt.h:32
@ MODEM_KEY_MGMT_CRED_TYPE_CA_CHAIN
Definition modem_key_mgmt.h:28
@ MODEM_KEY_MGMT_CRED_TYPE_PSK
Definition modem_key_mgmt.h:31
@ MODEM_KEY_MGMT_CRED_TYPE_PUBLIC_CERT
Definition modem_key_mgmt.h:29