|
10 | 10 |
|
11 | 11 | #include "port/posix/posix_transport_shm.h" |
12 | 12 | #include "port/posix/posix_transport_tcp.h" |
13 | | -#ifndef WOLFHSM_CFG_NO_CRYPTO |
| 13 | +#ifdef WOLFHSM_CFG_TLS |
14 | 14 | #include "port/posix/posix_transport_tls.h" |
15 | 15 | #endif |
16 | 16 |
|
17 | 17 | #include <string.h> |
18 | 18 |
|
19 | 19 | posixTransportShmClientContext tccShm; |
20 | 20 | posixTransportTcpClientContext tccTcp; |
21 | | -#ifndef WOLFHSM_CFG_NO_CRYPTO |
| 21 | +#ifdef WOLFHSM_CFG_TLS |
22 | 22 | posixTransportTlsClientContext tccTls; |
23 | 23 | #endif |
24 | 24 |
|
25 | 25 | posixTransportShmConfig shmConfig; |
26 | 26 | posixTransportTcpConfig tcpConfig; |
27 | | -#ifndef WOLFHSM_CFG_NO_CRYPTO |
| 27 | +#ifdef WOLFHSM_CFG_TLS |
28 | 28 | posixTransportTlsConfig tlsConfig; |
29 | 29 | #endif |
30 | 30 |
|
31 | 31 | whCommClientConfig c_comm; |
32 | 32 |
|
33 | 33 | whTransportClientCb shmCb = POSIX_TRANSPORT_SHM_CLIENT_CB; |
34 | 34 | whTransportClientCb tcpCb = PTT_CLIENT_CB; |
35 | | -#ifndef WOLFHSM_CFG_NO_CRYPTO |
| 35 | +#ifdef WOLFHSM_CFG_TLS |
36 | 36 | whTransportClientCb tlsCb = PTTLS_CLIENT_CB; |
37 | 37 | #endif |
38 | 38 |
|
@@ -135,7 +135,7 @@ int wh_PosixClient_ExampleTcpConfig(void* conf) |
135 | 135 | return WH_ERROR_OK; |
136 | 136 | } |
137 | 137 |
|
138 | | -#if !defined(WOLFHSM_CFG_NO_CRYPTO) && !defined(NO_TLS) |
| 138 | +#if defined(WOLFHSM_CFG_TLS) |
139 | 139 | /* client configuration setup example for TLS transport */ |
140 | 140 | #undef USE_CERT_BUFFERS_2048 |
141 | 141 | #define USE_CERT_BUFFERS_2048 |
@@ -212,7 +212,7 @@ int wh_PosixClient_ExamplePskConfig(void* conf) |
212 | 212 | return WH_ERROR_OK; |
213 | 213 | } |
214 | 214 | #endif /* NO_PSK */ |
215 | | -#endif /* WOLFHSM_CFG_NO_CRYPTO */ |
| 215 | +#endif /* WOLFHSM_CFG_TLS */ |
216 | 216 |
|
217 | 217 |
|
218 | 218 | /* client configuration setup example for transport */ |
|
0 commit comments