Network Services API
1.11.00.10
|
Data Structures | |
struct | TLS_Params |
TLS instance paramaters. More... | |
Typedefs | |
typedef void * | TLS_Handle |
Functions | |
void | TLS_Params_init (TLS_Params *params) |
Initialize the TLS Params structure to default values. More... | |
TLS_Handle | TLS_create (TLS_Method method, TLS_Params *params, char *certDir) |
Allocate and initialize a new TLS context and return its handle. More... | |
void | TLS_delete (TLS_Handle *tls) |
Destroy the TLS context instance and free the previously allocated instance object. More... | |
TLS Method | |
enum | TLS_Method { TLS_METHOD_CLIENT_TLSV1 = 1, TLS_METHOD_CLIENT_TLSV1_1, TLS_METHOD_CLIENT_TLSV1_2, TLS_METHOD_SERVER_TLSV1, TLS_METHOD_SERVER_TLSV1_1, TLS_METHOD_SERVER_TLSV1_2 } |
typedef enum TLS_Method | TLS_Method |
typedef struct TLS_Params | TLS_Params |
TLS instance paramaters. More... | |
This module provides a simple interface to create and delete TLS contexts for TI-RTOS supported TLS layers (i.e. SimpleLink and WolfSSL). These contexts can be shared with supported networking protocols like HTTP, MQTT and other protocols which require TLS and are connecting to the same host server.
The certificates can be provided either as a buffer input or as a string containing the location of certificates on the file system. The file system based approach is supported only for TI-RTOS/SimpleLink and Linux/Sitara devices. When the file system location is provided, the certificates have to be specifically named as:
When multiple TLS context instances are created, it is suggested the file system location for the certificates be separate for each instance.
The certificates input should be in PEM format except for certificates that are flashed on SimpleLink devices which should in DER format. This module converts the input PEM certificates to DER format and stores them on flash (for SimpleLink devices) and loads them on buffers (for WolfSSL supported devices).
typedef enum TLS_Method TLS_Method |
typedef struct TLS_Params TLS_Params |
TLS instance paramaters.
typedef void* TLS_Handle |
enum TLS_Method |
void TLS_Params_init | ( | TLS_Params * | params | ) |
Initialize the TLS Params structure to default values.
[in] | params | A pointer to the TLS_Params struct |
TLS_Handle TLS_create | ( | TLS_Method | method, |
TLS_Params * | params, | ||
char * | certDir | ||
) |
Allocate and initialize a new TLS context and return its handle.
This function takes in TLS_Method and either a structure of certificate/key buffers or the location of the certificates on file system. The buffers takes precedence over locations when both inputs are provided.
[in] | method | TLS version (see TLS_Method) |
[in] | params | Pointer to struct containing certificate/key buffers |
[in] | certDir | (Optional) location of certificates on file system. The certificates/key have to be specifically named as:
|
void TLS_delete | ( | TLS_Handle * | tls | ) |
Destroy the TLS context instance and free the previously allocated instance object.
[in] | tls | Pointer to the TLS context instance |