| 
    Zephyr Project API
    3.4.0
    
   A Scalable Open Source RTOS 
   | 
 
TLS credentials management. More...
Typedefs | |
| typedef int | sec_tag_t | 
Functions | |
| int | tls_credential_add (sec_tag_t tag, enum tls_credential_type type, const void *cred, size_t credlen) | 
| Add a TLS credential.  More... | |
| int | tls_credential_get (sec_tag_t tag, enum tls_credential_type type, void *cred, size_t *credlen) | 
| Get a TLS credential.  More... | |
| int | tls_credential_delete (sec_tag_t tag, enum tls_credential_type type) | 
| Delete a TLS credential.  More... | |
TLS credentials management.
| typedef int sec_tag_t | 
#include <include/zephyr/net/tls_credentials.h>
Secure tag, a reference to TLS credential
Secure tag can be used to reference credential after it was registered in the system.
| enum tls_credential_type | 
#include <include/zephyr/net/tls_credentials.h>
TLS credential types
| int tls_credential_add | ( | sec_tag_t | tag, | 
| enum tls_credential_type | type, | ||
| const void * | cred, | ||
| size_t | credlen | ||
| ) | 
#include <include/zephyr/net/tls_credentials.h>
Add a TLS credential.
This function adds a TLS credential, that can be used by TLS/DTLS for authentication.
| tag | A security tag that credential will be referenced with. | 
| type | A TLS/DTLS credential type. | 
| cred | A TLS/DTLS credential. | 
| credlen | A TLS/DTLS credential length. | 
| 0 | TLS credential successfully added. | 
| -EACCES | Access to the TLS credential subsystem was denied. | 
| -ENOMEM | Not enough memory to add new TLS credential. | 
| -EEXIST | TLS credential of specific tag and type already exists. | 
| int tls_credential_delete | ( | sec_tag_t | tag, | 
| enum tls_credential_type | type | ||
| ) | 
#include <include/zephyr/net/tls_credentials.h>
Delete a TLS credential.
This function removes a TLS credential, referenced by tag secure tag of type.
| tag | A security tag corresponding to removed credential. | 
| type | A TLS/DTLS credential type of removed credential. | 
| 0 | TLS credential successfully deleted. | 
| -EACCES | Access to the TLS credential subsystem was denied. | 
| -ENOENT | Requested TLS credential was not found. | 
| int tls_credential_get | ( | sec_tag_t | tag, | 
| enum tls_credential_type | type, | ||
| void * | cred, | ||
| size_t * | credlen | ||
| ) | 
#include <include/zephyr/net/tls_credentials.h>
Get a TLS credential.
This function gets an already registered TLS credential, referenced by tag secure tag of type.
| tag | A security tag of requested credential. | 
| type | A TLS/DTLS credential type of requested credential. | 
| cred | A buffer for TLS/DTLS credential. | 
| credlen | A buffer size on input. TLS/DTLS credential length on output. | 
| 0 | TLS credential successfully obtained. | 
| -EACCES | Access to the TLS credential subsystem was denied. | 
| -ENOENT | Requested TLS credential was not found. | 
| -EFBIG | Requested TLS credential does not fit in the buffer provided. |