feat(ssl): Restructure ssl folder

Put mbedtls, axtls, openssl to ssl, also add kconfig to choose ssl library.
Default use mbedtls.
This commit is contained in:
Wu Jian Gang
2018-04-09 20:09:27 +08:00
parent 3720ca8dba
commit 7782d6adf2
203 changed files with 41 additions and 26 deletions

View File

@ -1,6 +0,0 @@
#
# Component Makefile
#
COMPONENT_ADD_INCLUDEDIRS += include/ssl
COMPONENT_SRCDIRS := source/ssl source/crypto

View File

@ -1,8 +0,0 @@
#
# Component Makefile
#
COMPONENT_ADD_INCLUDEDIRS += include/mbedtls
COMPONENT_SRCDIRS += source/library source/platform
CFLAGS += -DMBEDTLS_CONFIG_FILE='"config_esp.h"'

View File

@ -1,6 +0,0 @@
#
# Component Makefile
#
COMPONENT_ADD_INCLUDEDIRS += include/openssl include/internal include/platform
COMPONENT_SRCDIRS := source/library source/platform

17
components/ssl/Kconfig Normal file
View File

@ -0,0 +1,17 @@
menu "SSL"
choice SSL_LIBRARY_CHOOSE
prompt "Choose SSL/TLS library"
default SSL_USING_MBEDTLS
help
Choose the SSL/TLS library which you want to use.
Currently we support mbedTLS and axTLS.
config SSL_USING_MBEDTLS
bool "mbedTLS"
config SSL_USING_AXTLS
bool "axTLS"
endchoice
endmenu

View File

@ -0,0 +1,6 @@
# Anyone compiling mbedTLS code needs the name of the
# alternative config file
#ifdef CONFIG_SSL_USING_MBEDTLS
CPPFLAGS += -DMBEDTLS_CONFIG_FILE='"mbedtls/config_esp.h"'
#endif

View File

@ -0,0 +1,15 @@
#
# Component Makefile
#
COMPONENT_ADD_INCLUDEDIRS := openssl/include
COMPONENT_PRIV_INCLUDEDIRS := openssl/include/internal openssl/include/openssl openssl/include/platform
COMPONENT_SRCDIRS := openssl/source/library openssl/source/platform
ifdef CONFIG_SSL_USING_MBEDTLS
COMPONENT_ADD_INCLUDEDIRS += mbedtls/include
COMPONENT_SRCDIRS += mbedtls/source/library mbedtls/source/platform
else
COMPONENT_ADD_INCLUDEDIRS += axtls/include
COMPONENT_SRCDIRS += axtls/source/ssl axtls/source/crypto
endif

Some files were not shown because too many files have changed in this diff Show More