ThingWorx C SDK
twTemplateSSL.h
Go to the documentation of this file.
1 
6 #ifndef TW_C_SDK_TWTEMPLATESSL_H
7 #define TW_C_SDK_TWTEMPLATESSL_H
8 
9 #include "twOSPort.h"
10 #include "twLogger.h"
11 #include "stringUtils.h"
12 
13 #include "stdio.h"
14 #include "string.h"
15 
16 #include "path/to/my/ssl/header.h"
17 
21 #define TW_SSL my_ssl_struct
22 
27 #define TW_SSL_FREE(a) my_ssl_struct_delete(a)
28 
33 #define TW_SSL_SESSION_ID(a) my_ssl_struct->session_id
34 
38 #define TW_SSL_CTX my_ssl_struct_ctx
39 
42 #define TW_NEW_SSL_CTX my_ssl_struct_ctx_create()
43 
48 #define TW_SSL_CTX_FREE(a) my_ssl_struct_ctx_delete()
49 
57 #define TW_USE_CERT_FILE(a, b, c) my_ssl_struct_ctx_load_object(a,b,c)
58 
66 #define TW_USE_KEY_FILE(a, b, c, d) my_ssl_struct_ctx_load_object(a,b,c)
67 
80 #define TW_USE_CERT_CHAIN_FILE(a, b, c) my_ssl_struct_ctx_load_object(a,b,c)
81 
93 #define TW_SET_CLIENT_CA_LIST(a, b) my_ssl_struct_ctx_load_object(a,b,NULL)
94 
102 #define TW_IS_FIPS_COMPATIBLE() returnValue(TW_FIPS_MODE_NOT_SUPPORTED)
103 
110 #define TW_ENABLE_FIPS_MODE() returnValue(TW_FIPS_MODE_NOT_SUPPORTED)
111 
118 #define TW_DISABLE_FIPS_MODE() returnValue(TW_FIPS_MODE_NOT_SUPPORTED)
119 
126 #define TW_IS_FIPS_MODE_ENABLED() returnValue(FALSE)
127 
133 #define TW_SSL_VERSION() returnValue(NULL)
134 
135 
139 #define TW_SHA1_CTX hash_state
140 
145 #define TW_SHA1_INIT(a) sha1_init(a)
146 
156 #define TW_SHA1_UPDATE(a, b, c) sha1_process(a,b,c)
157 
163 #define TW_SHA1_FINAL(a, b) sha1_done(b,a)
164 
168 #define TW_MD5_CTX hash_state
169 
174 #define TW_MD5_INIT(a) sha1_init(a)
175 
185 #define TW_MD5_UPDATE(a, b, c) sha1_process(a,b,c)
186 
192 #define TW_MD5_FINAL(a, b) sha1_done(b,a)
193 
194 #endif //TW_C_SDK_TWTEMPLATESSL_H
String utility function prototypes.
Wrappers for OS-specific functionality.
Structure definitions and function prototypes for the ThingWorx logging facility. ...