diff --git a/src/apps/altcp_tls/altcp_tls_mbedtls.c b/src/apps/altcp_tls/altcp_tls_mbedtls.c index ada6a8ab..d6ced89b 100644 --- a/src/apps/altcp_tls/altcp_tls_mbedtls.c +++ b/src/apps/altcp_tls/altcp_tls_mbedtls.c @@ -57,12 +57,12 @@ #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ -#include "lwip/apps/altcp_tls_opts.h" +#include "lwip/apps/altcp_tls_mbedtls_opts.h" #if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS #include "lwip/altcp.h" -#include "lwip/apps/altcp_tls.h" +#include "lwip/altcp_tls.h" #include "lwip/priv/altcp_priv.h" #include "altcp_tls_mbedtls_structs.h" diff --git a/src/apps/httpd/httpd.c b/src/apps/httpd/httpd.c index 10e7fe8b..5c219338 100644 --- a/src/apps/httpd/httpd.c +++ b/src/apps/httpd/httpd.c @@ -99,7 +99,7 @@ #include "lwip/altcp.h" #include "lwip/altcp_tcp.h" #if HTTPD_ENABLE_HTTPS -#include "lwip/apps/altcp_tls.h" +#include "lwip/altcp_tls.h" #endif #include /* memset */ diff --git a/src/apps/mqtt/mqtt.c b/src/apps/mqtt/mqtt.c index 1edb09a1..147c3b37 100644 --- a/src/apps/mqtt/mqtt.c +++ b/src/apps/mqtt/mqtt.c @@ -55,7 +55,7 @@ #include "lwip/pbuf.h" #include "lwip/altcp.h" #include "lwip/altcp_tcp.h" -#include "lwip/apps/altcp_tls.h" +#include "lwip/altcp_tls.h" #include #if LWIP_TCP && LWIP_CALLBACK_API diff --git a/src/include/lwip/apps/altcp_tls.h b/src/include/lwip/altcp_tls.h similarity index 98% rename from src/include/lwip/apps/altcp_tls.h rename to src/include/lwip/altcp_tls.h index 3a0bc9bd..aff57128 100644 --- a/src/include/lwip/apps/altcp_tls.h +++ b/src/include/lwip/altcp_tls.h @@ -43,8 +43,6 @@ #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ -#include "altcp_tls_opts.h" - #if LWIP_ALTCP_TLS #include "lwip/altcp.h" diff --git a/src/include/lwip/apps/altcp_tls_opts.h b/src/include/lwip/apps/altcp_tls_mbedtls_opts.h similarity index 90% rename from src/include/lwip/apps/altcp_tls_opts.h rename to src/include/lwip/apps/altcp_tls_mbedtls_opts.h index 83e1d9ff..36cddd93 100644 --- a/src/include/lwip/apps/altcp_tls_opts.h +++ b/src/include/lwip/apps/altcp_tls_mbedtls_opts.h @@ -2,7 +2,7 @@ * @file * Application layered TCP/TLS connection API (to be used from TCPIP thread) * - * This file contains options for a TLS layer. + * This file contains options for an mbedtls port of the TLS layer. */ /* @@ -43,21 +43,16 @@ #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ -/** LWIP_ALTCP_TLS==1: enable TLS support for altcp API */ -#ifndef LWIP_ALTCP_TLS -#define LWIP_ALTCP_TLS 0 -#endif - /** LWIP_ALTCP_TLS_MBEDTLS==1: use mbedTLS for TLS support for altcp API * mbedtls include directory must be reachable via include search path */ #ifndef LWIP_ALTCP_TLS_MBEDTLS -#define LWIP_ALTCP_TLS_MBEDTLS 0 +#define LWIP_ALTCP_TLS_MBEDTLS 0 #endif /** Configure debug level of this file */ #ifndef ALTCP_MBEDTLS_DEBUG -#define ALTCP_MBEDTLS_DEBUG LWIP_DBG_OFF +#define ALTCP_MBEDTLS_DEBUG LWIP_DBG_OFF #endif /** Set a session timeout in seconds for the basic session cache diff --git a/src/include/lwip/apps/mqtt.h b/src/include/lwip/apps/mqtt.h index 7e838620..3c2fd82f 100644 --- a/src/include/lwip/apps/mqtt.h +++ b/src/include/lwip/apps/mqtt.h @@ -40,7 +40,6 @@ #include "lwip/apps/mqtt_opts.h" #include "lwip/err.h" #include "lwip/ip_addr.h" -#include "lwip/apps/altcp_tls.h" #ifdef __cplusplus extern "C" { diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index c691a42a..86933cc6 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1355,6 +1355,12 @@ #ifndef LWIP_ALTCP #define LWIP_ALTCP 0 #endif + +/** LWIP_ALTCP_TLS==1: enable TLS support for altcp API */ +#ifndef LWIP_ALTCP_TLS +#define LWIP_ALTCP_TLS 0 +#endif + /** * @} */