Zephyr API 3.6.99
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
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#include <time.h>
30
76
92typedef int sec_tag_t;
93
94#define SEC_TAG_TLS_INVALID (-1)
113 const void *cred, size_t credlen);
114
133 void *cred, size_t *credlen);
134
149
163
164#ifdef __cplusplus
165}
166#endif
167
172#endif /* ZEPHYR_INCLUDE_NET_TLS_CREDENTIALS_H_ */
_TIME_T_ time_t
Definition _timespec.h:14
tls_credential_type
TLS credential types.
Definition tls_credentials.h:32
int tls_credential_add(sec_tag_t tag, enum tls_credential_type type, const void *cred, size_t credlen)
Add a TLS credential.
int tls_credential_expiry(sec_tag_t tag, enum tls_credential_type type, time_t *expiry)
Get the expiry time of a TLS credential.
int tls_credential_delete(sec_tag_t tag, enum tls_credential_type type)
Delete a TLS credential.
int sec_tag_t
Secure tag, a reference to TLS credential.
Definition tls_credentials.h:92
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
Pre-shared key identity.
Definition tls_credentials.h:64
@ TLS_CREDENTIAL_PRIVATE_KEY
Private key.
Definition tls_credentials.h:54
@ TLS_CREDENTIAL_SERVER_CERTIFICATE
Definition tls_credentials.h:49
@ TLS_CREDENTIAL_NONE
Unspecified credential.
Definition tls_credentials.h:34
@ TLS_CREDENTIAL_PSK
Pre-shared key.
Definition tls_credentials.h:59
@ TLS_CREDENTIAL_PUBLIC_CERTIFICATE
A public client or server certificate.
Definition tls_credentials.h:45
@ TLS_CREDENTIAL_CA_CERTIFICATE
A trusted CA certificate.
Definition tls_credentials.h:39
@ TLS_CREDENTIAL_PRIVATE_KEY_PSA
Private key resident in PSA.
Definition tls_credentials.h:74