diff --git a/src/core/coap/coap_secure.hpp b/src/core/coap/coap_secure.hpp index 11a24d1a8b8..ba15ee9ae85 100644 --- a/src/core/coap/coap_secure.hpp +++ b/src/core/coap/coap_secure.hpp @@ -31,6 +31,10 @@ #include "openthread-core-config.h" +#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE && !OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE +#error "CoAP Secure API feature requires `OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE`" +#endif + #if OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE #include "coap/coap.hpp" diff --git a/src/core/config/openthread-core-config-check.h b/src/core/config/openthread-core-config-check.h index c27cb8a54e0..b339a17221e 100644 --- a/src/core/config/openthread-core-config-check.h +++ b/src/core/config/openthread-core-config-check.h @@ -694,4 +694,8 @@ #error "OPENTHREAD_CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT is removed, behavior is always applied" #endif +#ifdef OPENTHREAD_CONFIG_DTLS_ENABLE +#error "OPENTHREAD_CONFIG_DTLS_ENABLE was replaced by OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE" +#endif + #endif // OPENTHREAD_CORE_CONFIG_CHECK_H_ diff --git a/src/core/config/secure_transport.h b/src/core/config/secure_transport.h index 9d3d77cca65..cfb04076d5b 100644 --- a/src/core/config/secure_transport.h +++ b/src/core/config/secure_transport.h @@ -68,10 +68,6 @@ OPENTHREAD_CONFIG_COMMISSIONER_ENABLE || OPENTHREAD_CONFIG_JOINER_ENABLE || OPENTHREAD_CONFIG_BLE_TCAT_ENABLE) #endif -#ifdef OPENTHREAD_CONFIG_DTLS_ENABLE -#error "OPENTHREAD_CONFIG_DTLS_ENABLE is deprecated please use OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE instead" -#endif - /** * @} */ diff --git a/src/core/meshcop/border_agent.hpp b/src/core/meshcop/border_agent.hpp index 864edde035a..a6b5f373e9f 100644 --- a/src/core/meshcop/border_agent.hpp +++ b/src/core/meshcop/border_agent.hpp @@ -56,6 +56,10 @@ namespace ot { namespace MeshCoP { +#if !OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE +#error "Border Agent feature requires `OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE`" +#endif + class BorderAgent : public InstanceLocator, private NonCopyable { friend class ot::Notifier; diff --git a/src/core/meshcop/commissioner.hpp b/src/core/meshcop/commissioner.hpp index 03f79044baa..a70f1ac2274 100644 --- a/src/core/meshcop/commissioner.hpp +++ b/src/core/meshcop/commissioner.hpp @@ -63,6 +63,10 @@ namespace ot { namespace MeshCoP { +#if !OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE +#error "Commissioner feature requires `OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE`" +#endif + class Commissioner : public InstanceLocator, private NonCopyable { friend class Tmf::Agent; diff --git a/src/core/meshcop/joiner.hpp b/src/core/meshcop/joiner.hpp index ca6549b8f47..5c5f0338338 100644 --- a/src/core/meshcop/joiner.hpp +++ b/src/core/meshcop/joiner.hpp @@ -59,6 +59,10 @@ namespace ot { namespace MeshCoP { +#if !OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE +#error "Joiner feature requires `OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE`" +#endif + class Joiner : public InstanceLocator, private NonCopyable { friend class Tmf::Agent; diff --git a/src/core/radio/ble_secure.hpp b/src/core/radio/ble_secure.hpp index 2eec3a3937f..8ff54d772c7 100644 --- a/src/core/radio/ble_secure.hpp +++ b/src/core/radio/ble_secure.hpp @@ -48,6 +48,10 @@ namespace ot { namespace Ble { +#if !OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE +#error "BLE TCAT feature requires `OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE`" +#endif + class BleSecure : public InstanceLocator, public MeshCoP::Tls::Extension, private NonCopyable { public: