Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
tls_credentials.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 Nordic Semiconductor ASA
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
13
#ifndef ZEPHYR_INCLUDE_NET_TLS_CREDENTIALS_H_
14
#define ZEPHYR_INCLUDE_NET_TLS_CREDENTIALS_H_
15
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
28
enum
tls_credential_type
{
30
TLS_CREDENTIAL_NONE
,
31
35
TLS_CREDENTIAL_CA_CERTIFICATE
,
36
41
TLS_CREDENTIAL_SERVER_CERTIFICATE
,
42
46
TLS_CREDENTIAL_PRIVATE_KEY
,
47
51
TLS_CREDENTIAL_PSK
,
52
56
TLS_CREDENTIAL_PSK_ID
57
};
58
70
typedef
int
sec_tag_t
;
71
88
int
tls_credential_add
(
sec_tag_t
tag
,
enum
tls_credential_type
type,
89
const
void
*cred,
size_t
credlen);
90
107
int
tls_credential_get
(
sec_tag_t
tag
,
enum
tls_credential_type
type,
108
void
*cred,
size_t
*credlen);
109
123
int
tls_credential_delete
(
sec_tag_t
tag
,
enum
tls_credential_type
type);
124
125
#ifdef __cplusplus
126
}
127
#endif
128
133
#endif
/* ZEPHYR_INCLUDE_NET_TLS_CREDENTIALS_H_ */
tls_credential_type
tls_credential_type
Definition:
tls_credentials.h:28
tls_credential_add
int tls_credential_add(sec_tag_t tag, enum tls_credential_type type, const void *cred, size_t credlen)
Add a TLS credential.
tls_credential_delete
int tls_credential_delete(sec_tag_t tag, enum tls_credential_type type)
Delete a TLS credential.
sec_tag_t
int sec_tag_t
Definition:
tls_credentials.h:70
tls_credential_get
int tls_credential_get(sec_tag_t tag, enum tls_credential_type type, void *cred, size_t *credlen)
Get a TLS credential.
TLS_CREDENTIAL_PSK_ID
@ TLS_CREDENTIAL_PSK_ID
Definition:
tls_credentials.h:56
TLS_CREDENTIAL_PRIVATE_KEY
@ TLS_CREDENTIAL_PRIVATE_KEY
Definition:
tls_credentials.h:46
TLS_CREDENTIAL_SERVER_CERTIFICATE
@ TLS_CREDENTIAL_SERVER_CERTIFICATE
Definition:
tls_credentials.h:41
TLS_CREDENTIAL_NONE
@ TLS_CREDENTIAL_NONE
Definition:
tls_credentials.h:30
TLS_CREDENTIAL_PSK
@ TLS_CREDENTIAL_PSK
Definition:
tls_credentials.h:51
TLS_CREDENTIAL_CA_CERTIFICATE
@ TLS_CREDENTIAL_CA_CERTIFICATE
Definition:
tls_credentials.h:35
tag
static const char * tag(void)
Definition:
main.c:27
include
net
tls_credentials.h
Generated on Sun Oct 9 2022 09:21:57 for Zephyr API Documentation by
1.9.4