From 0e67ff6bf06a2425c14df39c89738ae0744fdbfe Mon Sep 17 00:00:00 2001 From: Wu Jian Gang Date: Wed, 4 Apr 2018 19:40:34 +0800 Subject: [PATCH 1/3] feat(axtls): Move axtls to components --- {include => components/axtls/include}/ssl/ssl_bigint.h | 0 {include => components/axtls/include}/ssl/ssl_bigint_impl.h | 0 {include => components/axtls/include}/ssl/ssl_compat-1.0.h | 0 {include => components/axtls/include}/ssl/ssl_config.h | 0 {include => components/axtls/include}/ssl/ssl_crypto.h | 0 {include => components/axtls/include}/ssl/ssl_crypto_misc.h | 0 {include => components/axtls/include}/ssl/ssl_os_port.h | 0 {include => components/axtls/include}/ssl/ssl_platform.h | 0 {include => components/axtls/include}/ssl/ssl_ssl.h | 0 {include => components/axtls/include}/ssl/ssl_tls1.h | 0 {include => components/axtls/include}/ssl/ssl_version.h | 0 {third_party/ssl => components/axtls/source}/Makefile | 0 {third_party/ssl => components/axtls/source}/crypto/Makefile | 0 {third_party/ssl => components/axtls/source}/crypto/sha256.c | 0 {third_party/ssl => components/axtls/source}/crypto/sha384.c | 0 {third_party/ssl => components/axtls/source}/crypto/sha512.c | 0 {third_party/ssl => components/axtls/source}/crypto/ssl_aes.c | 0 {third_party/ssl => components/axtls/source}/crypto/ssl_bigint.c | 0 .../ssl => components/axtls/source}/crypto/ssl_crypto_misc.c | 0 {third_party/ssl => components/axtls/source}/crypto/ssl_hmac.c | 0 {third_party/ssl => components/axtls/source}/crypto/ssl_md5.c | 0 {third_party/ssl => components/axtls/source}/crypto/ssl_rc4.c | 0 {third_party/ssl => components/axtls/source}/crypto/ssl_rsa.c | 0 {third_party/ssl => components/axtls/source}/crypto/ssl_sha1.c | 0 {third_party/ssl => components/axtls/source}/ssl/Makefile | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_asn1.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_gen_cert.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_loader.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_openssl.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_os_port.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_p12.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_platform.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_tls1.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_tls1_clnt.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_tls1_svr.c | 0 {third_party/ssl => components/axtls/source}/ssl/ssl_x509.c | 0 36 files changed, 0 insertions(+), 0 deletions(-) rename {include => components/axtls/include}/ssl/ssl_bigint.h (100%) rename {include => components/axtls/include}/ssl/ssl_bigint_impl.h (100%) rename {include => components/axtls/include}/ssl/ssl_compat-1.0.h (100%) rename {include => components/axtls/include}/ssl/ssl_config.h (100%) rename {include => components/axtls/include}/ssl/ssl_crypto.h (100%) rename {include => components/axtls/include}/ssl/ssl_crypto_misc.h (100%) rename {include => components/axtls/include}/ssl/ssl_os_port.h (100%) rename {include => components/axtls/include}/ssl/ssl_platform.h (100%) rename {include => components/axtls/include}/ssl/ssl_ssl.h (100%) rename {include => components/axtls/include}/ssl/ssl_tls1.h (100%) rename {include => components/axtls/include}/ssl/ssl_version.h (100%) rename {third_party/ssl => components/axtls/source}/Makefile (100%) rename {third_party/ssl => components/axtls/source}/crypto/Makefile (100%) rename {third_party/ssl => components/axtls/source}/crypto/sha256.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/sha384.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/sha512.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/ssl_aes.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/ssl_bigint.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/ssl_crypto_misc.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/ssl_hmac.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/ssl_md5.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/ssl_rc4.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/ssl_rsa.c (100%) rename {third_party/ssl => components/axtls/source}/crypto/ssl_sha1.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/Makefile (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_asn1.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_gen_cert.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_loader.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_openssl.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_os_port.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_p12.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_platform.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_tls1.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_tls1_clnt.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_tls1_svr.c (100%) rename {third_party/ssl => components/axtls/source}/ssl/ssl_x509.c (100%) diff --git a/include/ssl/ssl_bigint.h b/components/axtls/include/ssl/ssl_bigint.h similarity index 100% rename from include/ssl/ssl_bigint.h rename to components/axtls/include/ssl/ssl_bigint.h diff --git a/include/ssl/ssl_bigint_impl.h b/components/axtls/include/ssl/ssl_bigint_impl.h similarity index 100% rename from include/ssl/ssl_bigint_impl.h rename to components/axtls/include/ssl/ssl_bigint_impl.h diff --git a/include/ssl/ssl_compat-1.0.h b/components/axtls/include/ssl/ssl_compat-1.0.h similarity index 100% rename from include/ssl/ssl_compat-1.0.h rename to components/axtls/include/ssl/ssl_compat-1.0.h diff --git a/include/ssl/ssl_config.h b/components/axtls/include/ssl/ssl_config.h similarity index 100% rename from include/ssl/ssl_config.h rename to components/axtls/include/ssl/ssl_config.h diff --git a/include/ssl/ssl_crypto.h b/components/axtls/include/ssl/ssl_crypto.h similarity index 100% rename from include/ssl/ssl_crypto.h rename to components/axtls/include/ssl/ssl_crypto.h diff --git a/include/ssl/ssl_crypto_misc.h b/components/axtls/include/ssl/ssl_crypto_misc.h similarity index 100% rename from include/ssl/ssl_crypto_misc.h rename to components/axtls/include/ssl/ssl_crypto_misc.h diff --git a/include/ssl/ssl_os_port.h b/components/axtls/include/ssl/ssl_os_port.h similarity index 100% rename from include/ssl/ssl_os_port.h rename to components/axtls/include/ssl/ssl_os_port.h diff --git a/include/ssl/ssl_platform.h b/components/axtls/include/ssl/ssl_platform.h similarity index 100% rename from include/ssl/ssl_platform.h rename to components/axtls/include/ssl/ssl_platform.h diff --git a/include/ssl/ssl_ssl.h b/components/axtls/include/ssl/ssl_ssl.h similarity index 100% rename from include/ssl/ssl_ssl.h rename to components/axtls/include/ssl/ssl_ssl.h diff --git a/include/ssl/ssl_tls1.h b/components/axtls/include/ssl/ssl_tls1.h similarity index 100% rename from include/ssl/ssl_tls1.h rename to components/axtls/include/ssl/ssl_tls1.h diff --git a/include/ssl/ssl_version.h b/components/axtls/include/ssl/ssl_version.h similarity index 100% rename from include/ssl/ssl_version.h rename to components/axtls/include/ssl/ssl_version.h diff --git a/third_party/ssl/Makefile b/components/axtls/source/Makefile similarity index 100% rename from third_party/ssl/Makefile rename to components/axtls/source/Makefile diff --git a/third_party/ssl/crypto/Makefile b/components/axtls/source/crypto/Makefile similarity index 100% rename from third_party/ssl/crypto/Makefile rename to components/axtls/source/crypto/Makefile diff --git a/third_party/ssl/crypto/sha256.c b/components/axtls/source/crypto/sha256.c similarity index 100% rename from third_party/ssl/crypto/sha256.c rename to components/axtls/source/crypto/sha256.c diff --git a/third_party/ssl/crypto/sha384.c b/components/axtls/source/crypto/sha384.c similarity index 100% rename from third_party/ssl/crypto/sha384.c rename to components/axtls/source/crypto/sha384.c diff --git a/third_party/ssl/crypto/sha512.c b/components/axtls/source/crypto/sha512.c similarity index 100% rename from third_party/ssl/crypto/sha512.c rename to components/axtls/source/crypto/sha512.c diff --git a/third_party/ssl/crypto/ssl_aes.c b/components/axtls/source/crypto/ssl_aes.c similarity index 100% rename from third_party/ssl/crypto/ssl_aes.c rename to components/axtls/source/crypto/ssl_aes.c diff --git a/third_party/ssl/crypto/ssl_bigint.c b/components/axtls/source/crypto/ssl_bigint.c similarity index 100% rename from third_party/ssl/crypto/ssl_bigint.c rename to components/axtls/source/crypto/ssl_bigint.c diff --git a/third_party/ssl/crypto/ssl_crypto_misc.c b/components/axtls/source/crypto/ssl_crypto_misc.c similarity index 100% rename from third_party/ssl/crypto/ssl_crypto_misc.c rename to components/axtls/source/crypto/ssl_crypto_misc.c diff --git a/third_party/ssl/crypto/ssl_hmac.c b/components/axtls/source/crypto/ssl_hmac.c similarity index 100% rename from third_party/ssl/crypto/ssl_hmac.c rename to components/axtls/source/crypto/ssl_hmac.c diff --git a/third_party/ssl/crypto/ssl_md5.c b/components/axtls/source/crypto/ssl_md5.c similarity index 100% rename from third_party/ssl/crypto/ssl_md5.c rename to components/axtls/source/crypto/ssl_md5.c diff --git a/third_party/ssl/crypto/ssl_rc4.c b/components/axtls/source/crypto/ssl_rc4.c similarity index 100% rename from third_party/ssl/crypto/ssl_rc4.c rename to components/axtls/source/crypto/ssl_rc4.c diff --git a/third_party/ssl/crypto/ssl_rsa.c b/components/axtls/source/crypto/ssl_rsa.c similarity index 100% rename from third_party/ssl/crypto/ssl_rsa.c rename to components/axtls/source/crypto/ssl_rsa.c diff --git a/third_party/ssl/crypto/ssl_sha1.c b/components/axtls/source/crypto/ssl_sha1.c similarity index 100% rename from third_party/ssl/crypto/ssl_sha1.c rename to components/axtls/source/crypto/ssl_sha1.c diff --git a/third_party/ssl/ssl/Makefile b/components/axtls/source/ssl/Makefile similarity index 100% rename from third_party/ssl/ssl/Makefile rename to components/axtls/source/ssl/Makefile diff --git a/third_party/ssl/ssl/ssl_asn1.c b/components/axtls/source/ssl/ssl_asn1.c similarity index 100% rename from third_party/ssl/ssl/ssl_asn1.c rename to components/axtls/source/ssl/ssl_asn1.c diff --git a/third_party/ssl/ssl/ssl_gen_cert.c b/components/axtls/source/ssl/ssl_gen_cert.c similarity index 100% rename from third_party/ssl/ssl/ssl_gen_cert.c rename to components/axtls/source/ssl/ssl_gen_cert.c diff --git a/third_party/ssl/ssl/ssl_loader.c b/components/axtls/source/ssl/ssl_loader.c similarity index 100% rename from third_party/ssl/ssl/ssl_loader.c rename to components/axtls/source/ssl/ssl_loader.c diff --git a/third_party/ssl/ssl/ssl_openssl.c b/components/axtls/source/ssl/ssl_openssl.c similarity index 100% rename from third_party/ssl/ssl/ssl_openssl.c rename to components/axtls/source/ssl/ssl_openssl.c diff --git a/third_party/ssl/ssl/ssl_os_port.c b/components/axtls/source/ssl/ssl_os_port.c similarity index 100% rename from third_party/ssl/ssl/ssl_os_port.c rename to components/axtls/source/ssl/ssl_os_port.c diff --git a/third_party/ssl/ssl/ssl_p12.c b/components/axtls/source/ssl/ssl_p12.c similarity index 100% rename from third_party/ssl/ssl/ssl_p12.c rename to components/axtls/source/ssl/ssl_p12.c diff --git a/third_party/ssl/ssl/ssl_platform.c b/components/axtls/source/ssl/ssl_platform.c similarity index 100% rename from third_party/ssl/ssl/ssl_platform.c rename to components/axtls/source/ssl/ssl_platform.c diff --git a/third_party/ssl/ssl/ssl_tls1.c b/components/axtls/source/ssl/ssl_tls1.c similarity index 100% rename from third_party/ssl/ssl/ssl_tls1.c rename to components/axtls/source/ssl/ssl_tls1.c diff --git a/third_party/ssl/ssl/ssl_tls1_clnt.c b/components/axtls/source/ssl/ssl_tls1_clnt.c similarity index 100% rename from third_party/ssl/ssl/ssl_tls1_clnt.c rename to components/axtls/source/ssl/ssl_tls1_clnt.c diff --git a/third_party/ssl/ssl/ssl_tls1_svr.c b/components/axtls/source/ssl/ssl_tls1_svr.c similarity index 100% rename from third_party/ssl/ssl/ssl_tls1_svr.c rename to components/axtls/source/ssl/ssl_tls1_svr.c diff --git a/third_party/ssl/ssl/ssl_x509.c b/components/axtls/source/ssl/ssl_x509.c similarity index 100% rename from third_party/ssl/ssl/ssl_x509.c rename to components/axtls/source/ssl/ssl_x509.c From 6365cb2693a3fa5a5c7038f67f4da774afecbc93 Mon Sep 17 00:00:00 2001 From: Dong Heng Date: Wed, 4 Apr 2018 17:38:21 +0800 Subject: [PATCH 2/3] feat(axtls): Add component.mk for axtls --- components/axtls/component.mk | 6 ++++ components/axtls/source/crypto/Makefile | 46 ------------------------- components/axtls/source/ssl/Makefile | 46 ------------------------- 3 files changed, 6 insertions(+), 92 deletions(-) create mode 100644 components/axtls/component.mk delete mode 100644 components/axtls/source/crypto/Makefile delete mode 100644 components/axtls/source/ssl/Makefile diff --git a/components/axtls/component.mk b/components/axtls/component.mk new file mode 100644 index 00000000..afa93d44 --- /dev/null +++ b/components/axtls/component.mk @@ -0,0 +1,6 @@ +# +# Component Makefile +# +COMPONENT_ADD_INCLUDEDIRS := include/ssl + +COMPONENT_SRCDIRS := source/ssl source/crypto diff --git a/components/axtls/source/crypto/Makefile b/components/axtls/source/crypto/Makefile deleted file mode 100644 index c59000f9..00000000 --- a/components/axtls/source/crypto/Makefile +++ /dev/null @@ -1,46 +0,0 @@ - -############################################################# -# Required variables for each makefile -# Discard this section from all parent makefiles -# Expected variables (with automatic defaults): -# CSRCS (all "C" files in the dir) -# SUBDIRS (all subdirs with a Makefile) -# GEN_LIBS - list of libs to be generated () -# GEN_IMAGES - list of images to be generated () -# COMPONENTS_xxx - a list of libs/objs in the form -# subdir/lib to be extracted and rolled up into -# a generated lib/image xxx.a () -# -ifndef PDIR - -GEN_LIBS = libsslcrypto.a - -endif - - -############################################################# -# Configuration i.e. compile options etc. -# Target specific stuff (defines etc.) goes in here! -# Generally values applying to a tree are captured in the -# makefile at its root level - these are then overridden -# for a subtree within the makefile rooted therein -# -#DEFINES += - -############################################################# -# Recursion Magic - Don't touch this!! -# -# Each subtree potentially has an include directory -# corresponding to the common APIs applicable to modules -# rooted at that subtree. Accordingly, the INCLUDE PATH -# of a module can only contain the include directories up -# its parent path, and not its siblings -# -# Required for each makefile to inherit from the parent -# - -INCLUDES := $(INCLUDES) -I $(PDIR)include -INCLUDES += -I ./ -PDIR := ../$(PDIR) -sinclude $(PDIR)Makefile - diff --git a/components/axtls/source/ssl/Makefile b/components/axtls/source/ssl/Makefile deleted file mode 100644 index 6433ee25..00000000 --- a/components/axtls/source/ssl/Makefile +++ /dev/null @@ -1,46 +0,0 @@ - -############################################################# -# Required variables for each makefile -# Discard this section from all parent makefiles -# Expected variables (with automatic defaults): -# CSRCS (all "C" files in the dir) -# SUBDIRS (all subdirs with a Makefile) -# GEN_LIBS - list of libs to be generated () -# GEN_IMAGES - list of images to be generated () -# COMPONENTS_xxx - a list of libs/objs in the form -# subdir/lib to be extracted and rolled up into -# a generated lib/image xxx.a () -# -ifndef PDIR - -GEN_LIBS = libsslssl.a - -endif - - -############################################################# -# Configuration i.e. compile options etc. -# Target specific stuff (defines etc.) goes in here! -# Generally values applying to a tree are captured in the -# makefile at its root level - these are then overridden -# for a subtree within the makefile rooted therein -# -#DEFINES += - -############################################################# -# Recursion Magic - Don't touch this!! -# -# Each subtree potentially has an include directory -# corresponding to the common APIs applicable to modules -# rooted at that subtree. Accordingly, the INCLUDE PATH -# of a module can only contain the include directories up -# its parent path, and not its siblings -# -# Required for each makefile to inherit from the parent -# - -INCLUDES := $(INCLUDES) -I $(PDIR)include -INCLUDES += -I ./ -PDIR := ../$(PDIR) -sinclude $(PDIR)Makefile - From 8a533b60c02da3d5feaa8173679985f2370a1384 Mon Sep 17 00:00:00 2001 From: Wu Jian Gang Date: Wed, 4 Apr 2018 19:54:12 +0800 Subject: [PATCH 3/3] fix(ci): Just a hack to pass ci firstly Will remove these when refactor finish. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1e0d22e8..52b4169f 100644 --- a/Makefile +++ b/Makefile @@ -422,7 +422,7 @@ INCLUDES += -I $(SDK_PATH)/include/lwip/ipv4 INCLUDES += -I $(SDK_PATH)/include/lwip/ipv6 INCLUDES += -I $(SDK_PATH)/include/nopoll INCLUDES += -I $(SDK_PATH)/include/spiffs -INCLUDES += -I $(SDK_PATH)/include/ssl +INCLUDES += -I $(SDK_PATH)/components/axtls/include INCLUDES += -I $(SDK_PATH)/include/json INCLUDES += -I $(SDK_PATH)/include/openssl INCLUDES += -I $(SDK_PATH)/include/mqtt