Zephyr Project API
3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
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
72
typedef
int
sec_tag_t
;
73
90
int
tls_credential_add
(
sec_tag_t
tag
,
enum
tls_credential_type
type,
91
const
void
*cred,
size_t
credlen);
92
109
int
tls_credential_get
(
sec_tag_t
tag
,
enum
tls_credential_type
type,
110
void
*cred,
size_t
*credlen);
111
125
int
tls_credential_delete
(
sec_tag_t
tag
,
enum
tls_credential_type
type);
126
127
#ifdef __cplusplus
128
}
129
#endif
130
135
#endif
/* ZEPHYR_INCLUDE_NET_TLS_CREDENTIALS_H_ */
tls_credential_type
tls_credential_type
TLS credential types.
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
Secure tag, a reference to TLS credential.
Definition
tls_credentials.h:72
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
Pre-shared key identity.
Definition
tls_credentials.h:56
TLS_CREDENTIAL_PRIVATE_KEY
@ TLS_CREDENTIAL_PRIVATE_KEY
Private key.
Definition
tls_credentials.h:46
TLS_CREDENTIAL_SERVER_CERTIFICATE
@ TLS_CREDENTIAL_SERVER_CERTIFICATE
A public server certificate.
Definition
tls_credentials.h:41
TLS_CREDENTIAL_NONE
@ TLS_CREDENTIAL_NONE
Unspecified credential.
Definition
tls_credentials.h:30
TLS_CREDENTIAL_PSK
@ TLS_CREDENTIAL_PSK
Pre-shared key.
Definition
tls_credentials.h:51
TLS_CREDENTIAL_CA_CERTIFICATE
@ TLS_CREDENTIAL_CA_CERTIFICATE
A trusted CA certificate.
Definition
tls_credentials.h:35
tag
static const char * tag(void)
Definition
main.c:27
include
zephyr
net
tls_credentials.h
Generated on Sun Sep 15 2024 17:01:30 for Zephyr Project API by
1.9.8