Skip to content

Commit 9302eb4

Browse files
use WOLFHSM_CFG_TLS macro guard with posix_transport_tls.c|h files
1 parent 8b4269a commit 9302eb4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

port/posix/posix_transport_tls.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "posix_transport_tls.h"
2929
#include "wolfhsm/wh_error.h"
3030

31-
#if !defined(NO_TLS) && !defined(WOLFCRYPT_ONLY)
31+
#if defined(WOLFHSM_CFG_TLS)
3232

3333
#include <stdio.h>
3434
#include <stdlib.h>
@@ -655,4 +655,5 @@ int posixTransportTls_GetAcceptFd(posixTransportTlsServerContext* context,
655655
}
656656
return ret;
657657
}
658-
#endif /* !defined(NO_TLS) && !defined(WOLFCRYPT_ONLY) */
658+
#endif /* WOLFHSM_CFG_TLS */
659+

port/posix/posix_transport_tls.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,12 @@
3838
/* Adds TLS on top of the existing TCP transport */
3939
#include "port/posix/posix_transport_tcp.h"
4040

41-
#ifndef WOLFHSM_CFG_NO_CRYPTO
41+
#ifdef WOLFHSM_CFG_TLS
4242
#ifndef WOLFSSL_USER_SETTINGS
4343
#include "wolfssl/options.h"
4444
#endif
4545
#include "wolfssl/ssl.h"
4646
#include "wolfssl/wolfcrypt/memory.h"
47-
#endif
4847

4948
#define PTTLS_PACKET_MAX_SIZE WH_COMM_MTU
5049
#define PTTLS_BUFFER_SIZE (sizeof(uint32_t) + PTTLS_PACKET_MAX_SIZE)
@@ -180,4 +179,5 @@ int posixTransportTls_GetListenFd(posixTransportTlsServerContext* context,
180179
int posixTransportTls_GetAcceptFd(posixTransportTlsServerContext* context,
181180
int* out_fd);
182181

182+
#endif /* WOLFHSM_CFG_TLS */
183183
#endif /* !PORT_POSIX_POSIX_TRANSPORT_TLS_H_ */

0 commit comments

Comments
 (0)