Network Services API  1.40.00.04
Typedefs | Functions
tls.h File Reference
#include <stdint.h>
Include dependency graph for tls.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

TLS Error Codes
#define TLS_EINVALIDPARAMS   (-11)
 Input parameters are invalid. More...
 
#define TLS_ENOTSUPPORTED   (-12)
 This feature is not supported on the network stack. More...
 
#define TLS_EALLOCFAIL   (-13)
 Not enough heap to allocate required memory. More...
 
#define TLS_ECERTLOADFAIL   (-14)
 Loading the certificate on SSL stack failed. More...
 
#define TLS_ECERTWRITEFAIL   (-15)
 Writing the certificate to filesystem failed. More...
 

Typedefs

typedef void * TLS_Handle
 

Functions

TLS_Handle TLS_create (TLS_Method method)
 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...
 
int TLS_setCertFile (TLS_Handle tls, TLS_Cert_Type type, TLS_Cert_Format format, const char *filePath)
 Set the certificate files required for TLS handshake. More...
 
int TLS_setCertBuf (TLS_Handle tls, TLS_Cert_Type type, TLS_Cert_Format format, uint8_t *buf, uint32_t buflen)
 Set the certificate buffers required for TLS handshake. More...
 
int TLS_writeDerFile (uint8_t *buf, uint32_t buflen, TLS_Cert_Format format, const char *filePath)
 Convert and write DER encoded certificate buffers to file system. More...
 
int TLS_writePemFile (uint8_t *buf, uint32_t buflen, TLS_Cert_Type type, TLS_Cert_Format format, const char *filePath)
 write PEM encoded certificate buffers to file system 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
 

TLS Certificate Type

enum  TLS_Cert_Type {
  TLS_CERT_TYPE_CA = 1,
  TLS_CERT_TYPE_CERT,
  TLS_CERT_TYPE_KEY,
  TLS_CERT_TYPE_DH_KEY
}
 
typedef enum TLS_Cert_Type TLS_Cert_Type
 

TLS Certificate Format

enum  TLS_Cert_Format {
  TLS_CERT_FORMAT_DER = 1,
  TLS_CERT_FORMAT_PEM
}
 
typedef enum TLS_Cert_Format TLS_Cert_Format
 
Copyright 2017, Texas Instruments Incorporated