nRF Connect SDK API 0.1.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
33};
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
98int modem_key_mgmt_read(nrf_sec_tag_t sec_tag,
99 enum modem_key_mgmt_cred_type cred_type,
100 void *buf, size_t *len);
101
117int modem_key_mgmt_cmp(nrf_sec_tag_t sec_tag,
118 enum modem_key_mgmt_cred_type cred_type,
119 const void *buf, size_t len);
120
133int modem_key_mgmt_exists(nrf_sec_tag_t sec_tag,
134 enum modem_key_mgmt_cred_type cred_type,
135 bool *exists);
136
139#ifdef __cplusplus
140}
141#endif
142
143#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_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