diff --git a/components/ssl/Kconfig b/components/ssl/Kconfig index 3bf39741..c5e1a204 100644 --- a/components/ssl/Kconfig +++ b/components/ssl/Kconfig @@ -16,6 +16,17 @@ config SSL_USING_WOLFSSL bool "wolfSSL" endchoice +menu "wolfSSL" + depends on SSL_USING_WOLFSSL + +config WOLFSSL_DEBUG + bool "Enable wolfSSL debugging" + default n + help + Enable wolfSSL debugging functions at compile time. + +endmenu # wolfSSL + menu "mbedTLS" depends on SSL_USING_MBEDTLS diff --git a/components/ssl/component.mk b/components/ssl/component.mk index 9aea7b2e..2b895613 100644 --- a/components/ssl/component.mk +++ b/components/ssl/component.mk @@ -5,8 +5,13 @@ ifdef CONFIG_SSL_USING_WOLFSSL COMPONENT_ADD_INCLUDEDIRS := wolfssl/include wolfssl/wolfssl wolfssl/wolfssl/wolfssl +ifdef CONFIG_WOLFSSL_DEBUG +WOLFSSLLIB = wolfssl_debug +COMPONENT_ADD_LDFLAGS := -L $(COMPONENT_PATH)/wolfssl/lib -lwolfssl_debug +else WOLFSSLLIB = wolfssl COMPONENT_ADD_LDFLAGS := -L $(COMPONENT_PATH)/wolfssl/lib -lwolfssl +endif # re-link program if wolfssl library change COMPONENT_ADD_LINKER_DEPS := $(patsubst %,$(COMPONENT_PATH)/wolfssl/lib/lib%.a,$(WOLFSSLLIB))