diff --git a/components/axtls/component.mk b/components/axtls/component.mk deleted file mode 100644 index e3d8fbb3..00000000 --- a/components/axtls/component.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# Component Makefile -# -COMPONENT_ADD_INCLUDEDIRS += include/ssl - -COMPONENT_SRCDIRS := source/ssl source/crypto diff --git a/components/mbedtls/component.mk b/components/mbedtls/component.mk deleted file mode 100644 index f6b10892..00000000 --- a/components/mbedtls/component.mk +++ /dev/null @@ -1,8 +0,0 @@ -# -# Component Makefile -# -COMPONENT_ADD_INCLUDEDIRS += include/mbedtls - -COMPONENT_SRCDIRS += source/library source/platform - -CFLAGS += -DMBEDTLS_CONFIG_FILE='"config_esp.h"' diff --git a/components/openssl/component.mk b/components/openssl/component.mk deleted file mode 100644 index 0288cc0b..00000000 --- a/components/openssl/component.mk +++ /dev/null @@ -1,6 +0,0 @@ -# -# Component Makefile -# -COMPONENT_ADD_INCLUDEDIRS += include/openssl include/internal include/platform - -COMPONENT_SRCDIRS := source/library source/platform diff --git a/components/ssl/Kconfig b/components/ssl/Kconfig new file mode 100644 index 00000000..ee445c7c --- /dev/null +++ b/components/ssl/Kconfig @@ -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 diff --git a/components/ssl/Makefile.projbuild b/components/ssl/Makefile.projbuild new file mode 100644 index 00000000..4e202f54 --- /dev/null +++ b/components/ssl/Makefile.projbuild @@ -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 diff --git a/components/axtls/include/ssl/ssl_bigint.h b/components/ssl/axtls/include/ssl/ssl_bigint.h similarity index 100% rename from components/axtls/include/ssl/ssl_bigint.h rename to components/ssl/axtls/include/ssl/ssl_bigint.h diff --git a/components/axtls/include/ssl/ssl_bigint_impl.h b/components/ssl/axtls/include/ssl/ssl_bigint_impl.h similarity index 100% rename from components/axtls/include/ssl/ssl_bigint_impl.h rename to components/ssl/axtls/include/ssl/ssl_bigint_impl.h diff --git a/components/axtls/include/ssl/ssl_compat-1.0.h b/components/ssl/axtls/include/ssl/ssl_compat-1.0.h similarity index 100% rename from components/axtls/include/ssl/ssl_compat-1.0.h rename to components/ssl/axtls/include/ssl/ssl_compat-1.0.h diff --git a/components/axtls/include/ssl/ssl_config.h b/components/ssl/axtls/include/ssl/ssl_config.h similarity index 100% rename from components/axtls/include/ssl/ssl_config.h rename to components/ssl/axtls/include/ssl/ssl_config.h diff --git a/components/axtls/include/ssl/ssl_crypto.h b/components/ssl/axtls/include/ssl/ssl_crypto.h similarity index 100% rename from components/axtls/include/ssl/ssl_crypto.h rename to components/ssl/axtls/include/ssl/ssl_crypto.h diff --git a/components/axtls/include/ssl/ssl_crypto_misc.h b/components/ssl/axtls/include/ssl/ssl_crypto_misc.h similarity index 100% rename from components/axtls/include/ssl/ssl_crypto_misc.h rename to components/ssl/axtls/include/ssl/ssl_crypto_misc.h diff --git a/components/axtls/include/ssl/ssl_os_port.h b/components/ssl/axtls/include/ssl/ssl_os_port.h similarity index 100% rename from components/axtls/include/ssl/ssl_os_port.h rename to components/ssl/axtls/include/ssl/ssl_os_port.h diff --git a/components/axtls/include/ssl/ssl_platform.h b/components/ssl/axtls/include/ssl/ssl_platform.h similarity index 100% rename from components/axtls/include/ssl/ssl_platform.h rename to components/ssl/axtls/include/ssl/ssl_platform.h diff --git a/components/axtls/include/ssl/ssl_ssl.h b/components/ssl/axtls/include/ssl/ssl_ssl.h similarity index 100% rename from components/axtls/include/ssl/ssl_ssl.h rename to components/ssl/axtls/include/ssl/ssl_ssl.h diff --git a/components/axtls/include/ssl/ssl_tls1.h b/components/ssl/axtls/include/ssl/ssl_tls1.h similarity index 100% rename from components/axtls/include/ssl/ssl_tls1.h rename to components/ssl/axtls/include/ssl/ssl_tls1.h diff --git a/components/axtls/include/ssl/ssl_version.h b/components/ssl/axtls/include/ssl/ssl_version.h similarity index 100% rename from components/axtls/include/ssl/ssl_version.h rename to components/ssl/axtls/include/ssl/ssl_version.h diff --git a/components/axtls/source/crypto/sha256.c b/components/ssl/axtls/source/crypto/sha256.c similarity index 99% rename from components/axtls/source/crypto/sha256.c rename to components/ssl/axtls/source/crypto/sha256.c index aaa6dee6..86eaf6dc 100644 --- a/components/axtls/source/crypto/sha256.c +++ b/components/ssl/axtls/source/crypto/sha256.c @@ -55,7 +55,7 @@ static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; (b)[(i) + 3] = (uint8_t) ((n) ); \ } -static const uint8_t sha256_padding[64] ICACHE_RODATA_ATTR STORE_ATTR = +static const uint8_t sha256_padding[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/components/axtls/source/crypto/sha384.c b/components/ssl/axtls/source/crypto/sha384.c similarity index 100% rename from components/axtls/source/crypto/sha384.c rename to components/ssl/axtls/source/crypto/sha384.c diff --git a/components/axtls/source/crypto/sha512.c b/components/ssl/axtls/source/crypto/sha512.c similarity index 98% rename from components/axtls/source/crypto/sha512.c rename to components/ssl/axtls/source/crypto/sha512.c index 3b9f2ac7..bfd33fc8 100644 --- a/components/axtls/source/crypto/sha512.c +++ b/components/ssl/axtls/source/crypto/sha512.c @@ -49,7 +49,7 @@ static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; #endif -static const uint8_t padding[128] ICACHE_RODATA_ATTR STORE_ATTR = +static const uint8_t padding[128] = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -61,7 +61,7 @@ static const uint8_t padding[128] ICACHE_RODATA_ATTR STORE_ATTR = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static const uint64_t k[80] ICACHE_RODATA_ATTR STORE_ATTR = +static const uint64_t k[80] = { 0x428A2F98D728AE22ULL, 0x7137449123EF65CDULL, 0xB5C0FBCFEC4D3B2FULL, 0xE9B5DBA58189DBBCULL, 0x3956C25BF348B538ULL, 0x59F111F1B605D019ULL, 0x923F82A4AF194F9BULL, 0xAB1C5ED5DA6D8118ULL, diff --git a/components/axtls/source/crypto/ssl_aes.c b/components/ssl/axtls/source/crypto/ssl_aes.c similarity index 98% rename from components/axtls/source/crypto/ssl_aes.c rename to components/ssl/axtls/source/crypto/ssl_aes.c index d0acd825..381a213b 100644 --- a/components/axtls/source/crypto/ssl_aes.c +++ b/components/ssl/axtls/source/crypto/ssl_aes.c @@ -81,7 +81,7 @@ static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; /* * AES S-box */ -static const uint8_t aes_sbox[256] ICACHE_RODATA_ATTR STORE_ATTR = +static const uint8_t aes_sbox[256] = { 0x63,0x7C,0x77,0x7B,0xF2,0x6B,0x6F,0xC5, 0x30,0x01,0x67,0x2B,0xFE,0xD7,0xAB,0x76, @@ -120,7 +120,7 @@ static const uint8_t aes_sbox[256] ICACHE_RODATA_ATTR STORE_ATTR = /* * AES is-box */ -static const uint8_t aes_isbox[256] ICACHE_RODATA_ATTR STORE_ATTR = +static const uint8_t aes_isbox[256] = { 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38, 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb, @@ -156,7 +156,7 @@ static const uint8_t aes_isbox[256] ICACHE_RODATA_ATTR STORE_ATTR = 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d }; -static const unsigned char Rcon[30] ICACHE_RODATA_ATTR STORE_ATTR = +static const unsigned char Rcon[30] = { 0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80, 0x1b,0x36,0x6c,0xd8,0xab,0x4d,0x9a,0x2f, diff --git a/components/axtls/source/crypto/ssl_bigint.c b/components/ssl/axtls/source/crypto/ssl_bigint.c similarity index 100% rename from components/axtls/source/crypto/ssl_bigint.c rename to components/ssl/axtls/source/crypto/ssl_bigint.c diff --git a/components/axtls/source/crypto/ssl_crypto_misc.c b/components/ssl/axtls/source/crypto/ssl_crypto_misc.c similarity index 98% rename from components/axtls/source/crypto/ssl_crypto_misc.c rename to components/ssl/axtls/source/crypto/ssl_crypto_misc.c index 39fb1786..abb60738 100644 --- a/components/axtls/source/crypto/ssl_crypto_misc.c +++ b/components/ssl/axtls/source/crypto/ssl_crypto_misc.c @@ -61,7 +61,7 @@ static HCRYPTPROV gCryptProv; static uint8_t entropy_pool[ENTROPY_POOL_SIZE]; #endif -const char unsupported_str[] ICACHE_RODATA_ATTR STORE_ATTR = "Error: Feature not supported\n"; +const char unsupported_str[] = "Error: Feature not supported\n"; #ifndef CONFIG_SSL_SKELETON_MODE /** @@ -338,7 +338,7 @@ EXP_FUNC void STDCALL print_blob(const char *format, const unsigned char *data, #if defined(CONFIG_SSL_HAS_PEM) || defined(CONFIG_HTTP_HAS_AUTHORIZATION) /* base64 to binary lookup table */ -static const uint8_t map[128] ICACHE_RODATA_ATTR STORE_ATTR = +static const uint8_t map[128] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, diff --git a/components/axtls/source/crypto/ssl_hmac.c b/components/ssl/axtls/source/crypto/ssl_hmac.c similarity index 100% rename from components/axtls/source/crypto/ssl_hmac.c rename to components/ssl/axtls/source/crypto/ssl_hmac.c diff --git a/components/axtls/source/crypto/ssl_md5.c b/components/ssl/axtls/source/crypto/ssl_md5.c similarity index 100% rename from components/axtls/source/crypto/ssl_md5.c rename to components/ssl/axtls/source/crypto/ssl_md5.c diff --git a/components/axtls/source/crypto/ssl_rc4.c b/components/ssl/axtls/source/crypto/ssl_rc4.c similarity index 100% rename from components/axtls/source/crypto/ssl_rc4.c rename to components/ssl/axtls/source/crypto/ssl_rc4.c diff --git a/components/axtls/source/crypto/ssl_rsa.c b/components/ssl/axtls/source/crypto/ssl_rsa.c similarity index 100% rename from components/axtls/source/crypto/ssl_rsa.c rename to components/ssl/axtls/source/crypto/ssl_rsa.c diff --git a/components/axtls/source/crypto/ssl_sha1.c b/components/ssl/axtls/source/crypto/ssl_sha1.c similarity index 100% rename from components/axtls/source/crypto/ssl_sha1.c rename to components/ssl/axtls/source/crypto/ssl_sha1.c diff --git a/components/axtls/source/ssl/ssl_asn1.c b/components/ssl/axtls/source/ssl/ssl_asn1.c similarity index 100% rename from components/axtls/source/ssl/ssl_asn1.c rename to components/ssl/axtls/source/ssl/ssl_asn1.c diff --git a/components/axtls/source/ssl/ssl_gen_cert.c b/components/ssl/axtls/source/ssl/ssl_gen_cert.c similarity index 100% rename from components/axtls/source/ssl/ssl_gen_cert.c rename to components/ssl/axtls/source/ssl/ssl_gen_cert.c diff --git a/components/axtls/source/ssl/ssl_loader.c b/components/ssl/axtls/source/ssl/ssl_loader.c similarity index 98% rename from components/axtls/source/ssl/ssl_loader.c rename to components/ssl/axtls/source/ssl/ssl_loader.c index 0a2c17d6..27782dae 100644 --- a/components/axtls/source/ssl/ssl_loader.c +++ b/components/ssl/axtls/source/ssl/ssl_loader.c @@ -191,7 +191,7 @@ void ICACHE_FLASH_ATTR ssl_obj_free(SSLObjLoader *ssl_obj) #define IS_PRIVATE_KEY 2 #define IS_CERTIFICATE 3 -static const char begins[NUM_PEM_TYPES][40] ICACHE_RODATA_ATTR STORE_ATTR = +static const char begins[NUM_PEM_TYPES][40] = { "-----BEGIN RSA PRIVATE KEY-----", "-----BEGIN ENCRYPTED PRIVATE KEY-----", @@ -199,7 +199,7 @@ static const char begins[NUM_PEM_TYPES][40] ICACHE_RODATA_ATTR STORE_ATTR = "-----BEGIN CERTIFICATE-----", }; -static const char ends[NUM_PEM_TYPES][40] ICACHE_RODATA_ATTR STORE_ATTR = +static const char ends[NUM_PEM_TYPES][40] = { "-----END RSA PRIVATE KEY-----", "-----END ENCRYPTED PRIVATE KEY-----", @@ -207,7 +207,7 @@ static const char ends[NUM_PEM_TYPES][40] ICACHE_RODATA_ATTR STORE_ATTR = "-----END CERTIFICATE-----", }; -static const char aes_str[2][24] ICACHE_RODATA_ATTR STORE_ATTR = +static const char aes_str[2][24] = { "DEK-Info: AES-128-CBC,", "DEK-Info: AES-256-CBC," diff --git a/components/axtls/source/ssl/ssl_openssl.c b/components/ssl/axtls/source/ssl/ssl_openssl.c similarity index 100% rename from components/axtls/source/ssl/ssl_openssl.c rename to components/ssl/axtls/source/ssl/ssl_openssl.c diff --git a/components/axtls/source/ssl/ssl_os_port.c b/components/ssl/axtls/source/ssl/ssl_os_port.c similarity index 100% rename from components/axtls/source/ssl/ssl_os_port.c rename to components/ssl/axtls/source/ssl/ssl_os_port.c diff --git a/components/axtls/source/ssl/ssl_p12.c b/components/ssl/axtls/source/ssl/ssl_p12.c similarity index 100% rename from components/axtls/source/ssl/ssl_p12.c rename to components/ssl/axtls/source/ssl/ssl_p12.c diff --git a/components/axtls/source/ssl/ssl_platform.c b/components/ssl/axtls/source/ssl/ssl_platform.c similarity index 99% rename from components/axtls/source/ssl/ssl_platform.c rename to components/ssl/axtls/source/ssl/ssl_platform.c index 655623b1..eff9f983 100644 --- a/components/axtls/source/ssl/ssl_platform.c +++ b/components/ssl/axtls/source/ssl/ssl_platform.c @@ -107,7 +107,7 @@ char *ICACHE_FLASH_ATTR esp_EVP_cleanup(void) return NULL; } -static const unsigned char base64_enc_map[64] ICACHE_RODATA_ATTR STORE_ATTR = +static const unsigned char base64_enc_map[64] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', diff --git a/components/axtls/source/ssl/ssl_tls1.c b/components/ssl/axtls/source/ssl/ssl_tls1.c similarity index 99% rename from components/axtls/source/ssl/ssl_tls1.c rename to components/ssl/axtls/source/ssl/ssl_tls1.c index e9191687..24cdcf69 100644 --- a/components/axtls/source/ssl/ssl_tls1.c +++ b/components/ssl/axtls/source/ssl/ssl_tls1.c @@ -44,10 +44,10 @@ static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; /* The session expiry time */ #define SSL_EXPIRY_TIME (CONFIG_SSL_EXPIRY_TIME*3600) -static const uint8_t g_hello_request[] ICACHE_RODATA_ATTR STORE_ATTR = { HS_HELLO_REQUEST, 0, 0, 0 }; -static const uint8_t g_chg_cipher_spec_pkt[] ICACHE_RODATA_ATTR STORE_ATTR = { 1 }; -static const char server_finished[] ICACHE_RODATA_ATTR STORE_ATTR = "server finished"; -static const char client_finished[] ICACHE_RODATA_ATTR STORE_ATTR = "client finished"; +static const uint8_t g_hello_request[] = { HS_HELLO_REQUEST, 0, 0, 0 }; +static const uint8_t g_chg_cipher_spec_pkt[] = { 1 }; +static const char server_finished[] = "server finished"; +static const char client_finished[] = "client finished"; static int do_handshake(SSL *ssl, uint8_t *buf, int read_len); static int set_key_block(SSL *ssl, int is_write); @@ -65,7 +65,7 @@ const uint8_t ssl_prot_prefs[NUM_PROTOCOLS] = #else static void session_free(SSL_SESSION *ssl_sessions[], int sess_index); -const uint8_t ssl_prot_prefs[NUM_PROTOCOLS] ICACHE_RODATA_ATTR STORE_ATTR = +const uint8_t ssl_prot_prefs[NUM_PROTOCOLS] = #ifdef CONFIG_SSL_PROT_LOW /* low security, fast speed */ { SSL_RC4_128_SHA, SSL_AES128_SHA, SSL_AES256_SHA, SSL_RC4_128_MD5 }; #elif CONFIG_SSL_PROT_MEDIUM /* medium security, medium speed */ diff --git a/components/axtls/source/ssl/ssl_tls1_clnt.c b/components/ssl/axtls/source/ssl/ssl_tls1_clnt.c similarity index 100% rename from components/axtls/source/ssl/ssl_tls1_clnt.c rename to components/ssl/axtls/source/ssl/ssl_tls1_clnt.c diff --git a/components/axtls/source/ssl/ssl_tls1_svr.c b/components/ssl/axtls/source/ssl/ssl_tls1_svr.c similarity index 98% rename from components/axtls/source/ssl/ssl_tls1_svr.c rename to components/ssl/axtls/source/ssl/ssl_tls1_svr.c index 33995a5a..7f043333 100644 --- a/components/axtls/source/ssl/ssl_tls1_svr.c +++ b/components/ssl/axtls/source/ssl/ssl_tls1_svr.c @@ -31,7 +31,7 @@ #include "ssl/ssl_os_port.h" #include "ssl/ssl_ssl.h" -static const uint8_t g_hello_done[] ICACHE_RODATA_ATTR STORE_ATTR = { HS_SERVER_HELLO_DONE, 0, 0, 0 }; +static const uint8_t g_hello_done[] = { HS_SERVER_HELLO_DONE, 0, 0, 0 }; #ifdef MEMLEAK_DEBUG static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; @@ -435,7 +435,7 @@ error: } #ifdef CONFIG_SSL_CERT_VERIFICATION -static const uint8_t g_cert_request[] ICACHE_RODATA_ATTR STORE_ATTR = { HS_CERT_REQ, 0, 0, 4, 1, 0, 0, 0 }; +static const uint8_t g_cert_request[] = { HS_CERT_REQ, 0, 0, 4, 1, 0, 0, 0 }; /* * Send the certificate request message. diff --git a/components/axtls/source/ssl/ssl_x509.c b/components/ssl/axtls/source/ssl/ssl_x509.c similarity index 100% rename from components/axtls/source/ssl/ssl_x509.c rename to components/ssl/axtls/source/ssl/ssl_x509.c diff --git a/components/ssl/component.mk b/components/ssl/component.mk new file mode 100644 index 00000000..209bf29f --- /dev/null +++ b/components/ssl/component.mk @@ -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 \ No newline at end of file diff --git a/components/mbedtls/include/mbedtls/aes.h b/components/ssl/mbedtls/include/mbedtls/aes.h similarity index 100% rename from components/mbedtls/include/mbedtls/aes.h rename to components/ssl/mbedtls/include/mbedtls/aes.h diff --git a/components/mbedtls/include/mbedtls/aesni.h b/components/ssl/mbedtls/include/mbedtls/aesni.h similarity index 100% rename from components/mbedtls/include/mbedtls/aesni.h rename to components/ssl/mbedtls/include/mbedtls/aesni.h diff --git a/components/mbedtls/include/mbedtls/arc4.h b/components/ssl/mbedtls/include/mbedtls/arc4.h similarity index 100% rename from components/mbedtls/include/mbedtls/arc4.h rename to components/ssl/mbedtls/include/mbedtls/arc4.h diff --git a/components/mbedtls/include/mbedtls/asn1.h b/components/ssl/mbedtls/include/mbedtls/asn1.h similarity index 100% rename from components/mbedtls/include/mbedtls/asn1.h rename to components/ssl/mbedtls/include/mbedtls/asn1.h diff --git a/components/mbedtls/include/mbedtls/asn1write.h b/components/ssl/mbedtls/include/mbedtls/asn1write.h similarity index 100% rename from components/mbedtls/include/mbedtls/asn1write.h rename to components/ssl/mbedtls/include/mbedtls/asn1write.h diff --git a/components/mbedtls/include/mbedtls/base64.h b/components/ssl/mbedtls/include/mbedtls/base64.h similarity index 100% rename from components/mbedtls/include/mbedtls/base64.h rename to components/ssl/mbedtls/include/mbedtls/base64.h diff --git a/components/mbedtls/include/mbedtls/bignum.h b/components/ssl/mbedtls/include/mbedtls/bignum.h similarity index 100% rename from components/mbedtls/include/mbedtls/bignum.h rename to components/ssl/mbedtls/include/mbedtls/bignum.h diff --git a/components/mbedtls/include/mbedtls/blowfish.h b/components/ssl/mbedtls/include/mbedtls/blowfish.h similarity index 100% rename from components/mbedtls/include/mbedtls/blowfish.h rename to components/ssl/mbedtls/include/mbedtls/blowfish.h diff --git a/components/mbedtls/include/mbedtls/bn_mul.h b/components/ssl/mbedtls/include/mbedtls/bn_mul.h similarity index 100% rename from components/mbedtls/include/mbedtls/bn_mul.h rename to components/ssl/mbedtls/include/mbedtls/bn_mul.h diff --git a/components/mbedtls/include/mbedtls/camellia.h b/components/ssl/mbedtls/include/mbedtls/camellia.h similarity index 100% rename from components/mbedtls/include/mbedtls/camellia.h rename to components/ssl/mbedtls/include/mbedtls/camellia.h diff --git a/components/mbedtls/include/mbedtls/ccm.h b/components/ssl/mbedtls/include/mbedtls/ccm.h similarity index 100% rename from components/mbedtls/include/mbedtls/ccm.h rename to components/ssl/mbedtls/include/mbedtls/ccm.h diff --git a/components/mbedtls/include/mbedtls/certs.h b/components/ssl/mbedtls/include/mbedtls/certs.h similarity index 100% rename from components/mbedtls/include/mbedtls/certs.h rename to components/ssl/mbedtls/include/mbedtls/certs.h diff --git a/components/mbedtls/include/mbedtls/check_config.h b/components/ssl/mbedtls/include/mbedtls/check_config.h similarity index 100% rename from components/mbedtls/include/mbedtls/check_config.h rename to components/ssl/mbedtls/include/mbedtls/check_config.h diff --git a/components/mbedtls/include/mbedtls/cipher.h b/components/ssl/mbedtls/include/mbedtls/cipher.h similarity index 100% rename from components/mbedtls/include/mbedtls/cipher.h rename to components/ssl/mbedtls/include/mbedtls/cipher.h diff --git a/components/mbedtls/include/mbedtls/cipher_internal.h b/components/ssl/mbedtls/include/mbedtls/cipher_internal.h similarity index 100% rename from components/mbedtls/include/mbedtls/cipher_internal.h rename to components/ssl/mbedtls/include/mbedtls/cipher_internal.h diff --git a/components/mbedtls/include/mbedtls/compat-1.3.h b/components/ssl/mbedtls/include/mbedtls/compat-1.3.h similarity index 100% rename from components/mbedtls/include/mbedtls/compat-1.3.h rename to components/ssl/mbedtls/include/mbedtls/compat-1.3.h diff --git a/components/mbedtls/include/mbedtls/config.h b/components/ssl/mbedtls/include/mbedtls/config.h similarity index 100% rename from components/mbedtls/include/mbedtls/config.h rename to components/ssl/mbedtls/include/mbedtls/config.h diff --git a/components/mbedtls/include/mbedtls/config_esp.h b/components/ssl/mbedtls/include/mbedtls/config_esp.h similarity index 100% rename from components/mbedtls/include/mbedtls/config_esp.h rename to components/ssl/mbedtls/include/mbedtls/config_esp.h diff --git a/components/mbedtls/include/mbedtls/ctr_drbg.h b/components/ssl/mbedtls/include/mbedtls/ctr_drbg.h similarity index 100% rename from components/mbedtls/include/mbedtls/ctr_drbg.h rename to components/ssl/mbedtls/include/mbedtls/ctr_drbg.h diff --git a/components/mbedtls/include/mbedtls/debug.h b/components/ssl/mbedtls/include/mbedtls/debug.h similarity index 100% rename from components/mbedtls/include/mbedtls/debug.h rename to components/ssl/mbedtls/include/mbedtls/debug.h diff --git a/components/mbedtls/include/mbedtls/des.h b/components/ssl/mbedtls/include/mbedtls/des.h similarity index 100% rename from components/mbedtls/include/mbedtls/des.h rename to components/ssl/mbedtls/include/mbedtls/des.h diff --git a/components/mbedtls/include/mbedtls/dhm.h b/components/ssl/mbedtls/include/mbedtls/dhm.h similarity index 100% rename from components/mbedtls/include/mbedtls/dhm.h rename to components/ssl/mbedtls/include/mbedtls/dhm.h diff --git a/components/mbedtls/include/mbedtls/ecdh.h b/components/ssl/mbedtls/include/mbedtls/ecdh.h similarity index 100% rename from components/mbedtls/include/mbedtls/ecdh.h rename to components/ssl/mbedtls/include/mbedtls/ecdh.h diff --git a/components/mbedtls/include/mbedtls/ecdsa.h b/components/ssl/mbedtls/include/mbedtls/ecdsa.h similarity index 100% rename from components/mbedtls/include/mbedtls/ecdsa.h rename to components/ssl/mbedtls/include/mbedtls/ecdsa.h diff --git a/components/mbedtls/include/mbedtls/ecjpake.h b/components/ssl/mbedtls/include/mbedtls/ecjpake.h similarity index 100% rename from components/mbedtls/include/mbedtls/ecjpake.h rename to components/ssl/mbedtls/include/mbedtls/ecjpake.h diff --git a/components/mbedtls/include/mbedtls/ecp.h b/components/ssl/mbedtls/include/mbedtls/ecp.h similarity index 100% rename from components/mbedtls/include/mbedtls/ecp.h rename to components/ssl/mbedtls/include/mbedtls/ecp.h diff --git a/components/mbedtls/include/mbedtls/entropy.h b/components/ssl/mbedtls/include/mbedtls/entropy.h similarity index 100% rename from components/mbedtls/include/mbedtls/entropy.h rename to components/ssl/mbedtls/include/mbedtls/entropy.h diff --git a/components/mbedtls/include/mbedtls/entropy_poll.h b/components/ssl/mbedtls/include/mbedtls/entropy_poll.h similarity index 100% rename from components/mbedtls/include/mbedtls/entropy_poll.h rename to components/ssl/mbedtls/include/mbedtls/entropy_poll.h diff --git a/components/mbedtls/include/mbedtls/error.h b/components/ssl/mbedtls/include/mbedtls/error.h similarity index 100% rename from components/mbedtls/include/mbedtls/error.h rename to components/ssl/mbedtls/include/mbedtls/error.h diff --git a/components/mbedtls/include/mbedtls/gcm.h b/components/ssl/mbedtls/include/mbedtls/gcm.h similarity index 100% rename from components/mbedtls/include/mbedtls/gcm.h rename to components/ssl/mbedtls/include/mbedtls/gcm.h diff --git a/components/mbedtls/include/mbedtls/havege.h b/components/ssl/mbedtls/include/mbedtls/havege.h similarity index 100% rename from components/mbedtls/include/mbedtls/havege.h rename to components/ssl/mbedtls/include/mbedtls/havege.h diff --git a/components/mbedtls/include/mbedtls/hmac_drbg.h b/components/ssl/mbedtls/include/mbedtls/hmac_drbg.h similarity index 100% rename from components/mbedtls/include/mbedtls/hmac_drbg.h rename to components/ssl/mbedtls/include/mbedtls/hmac_drbg.h diff --git a/components/mbedtls/include/mbedtls/md.h b/components/ssl/mbedtls/include/mbedtls/md.h similarity index 100% rename from components/mbedtls/include/mbedtls/md.h rename to components/ssl/mbedtls/include/mbedtls/md.h diff --git a/components/mbedtls/include/mbedtls/md2.h b/components/ssl/mbedtls/include/mbedtls/md2.h similarity index 100% rename from components/mbedtls/include/mbedtls/md2.h rename to components/ssl/mbedtls/include/mbedtls/md2.h diff --git a/components/mbedtls/include/mbedtls/md4.h b/components/ssl/mbedtls/include/mbedtls/md4.h similarity index 100% rename from components/mbedtls/include/mbedtls/md4.h rename to components/ssl/mbedtls/include/mbedtls/md4.h diff --git a/components/mbedtls/include/mbedtls/md5.h b/components/ssl/mbedtls/include/mbedtls/md5.h similarity index 100% rename from components/mbedtls/include/mbedtls/md5.h rename to components/ssl/mbedtls/include/mbedtls/md5.h diff --git a/components/mbedtls/include/mbedtls/md_internal.h b/components/ssl/mbedtls/include/mbedtls/md_internal.h similarity index 100% rename from components/mbedtls/include/mbedtls/md_internal.h rename to components/ssl/mbedtls/include/mbedtls/md_internal.h diff --git a/components/mbedtls/include/mbedtls/memory_buffer_alloc.h b/components/ssl/mbedtls/include/mbedtls/memory_buffer_alloc.h similarity index 100% rename from components/mbedtls/include/mbedtls/memory_buffer_alloc.h rename to components/ssl/mbedtls/include/mbedtls/memory_buffer_alloc.h diff --git a/components/mbedtls/include/mbedtls/net.h b/components/ssl/mbedtls/include/mbedtls/net.h similarity index 100% rename from components/mbedtls/include/mbedtls/net.h rename to components/ssl/mbedtls/include/mbedtls/net.h diff --git a/components/mbedtls/include/mbedtls/oid.h b/components/ssl/mbedtls/include/mbedtls/oid.h similarity index 100% rename from components/mbedtls/include/mbedtls/oid.h rename to components/ssl/mbedtls/include/mbedtls/oid.h diff --git a/components/mbedtls/include/mbedtls/padlock.h b/components/ssl/mbedtls/include/mbedtls/padlock.h similarity index 100% rename from components/mbedtls/include/mbedtls/padlock.h rename to components/ssl/mbedtls/include/mbedtls/padlock.h diff --git a/components/mbedtls/include/mbedtls/pem.h b/components/ssl/mbedtls/include/mbedtls/pem.h similarity index 100% rename from components/mbedtls/include/mbedtls/pem.h rename to components/ssl/mbedtls/include/mbedtls/pem.h diff --git a/components/mbedtls/include/mbedtls/pk.h b/components/ssl/mbedtls/include/mbedtls/pk.h similarity index 100% rename from components/mbedtls/include/mbedtls/pk.h rename to components/ssl/mbedtls/include/mbedtls/pk.h diff --git a/components/mbedtls/include/mbedtls/pk_internal.h b/components/ssl/mbedtls/include/mbedtls/pk_internal.h similarity index 100% rename from components/mbedtls/include/mbedtls/pk_internal.h rename to components/ssl/mbedtls/include/mbedtls/pk_internal.h diff --git a/components/mbedtls/include/mbedtls/pkcs11.h b/components/ssl/mbedtls/include/mbedtls/pkcs11.h similarity index 100% rename from components/mbedtls/include/mbedtls/pkcs11.h rename to components/ssl/mbedtls/include/mbedtls/pkcs11.h diff --git a/components/mbedtls/include/mbedtls/pkcs12.h b/components/ssl/mbedtls/include/mbedtls/pkcs12.h similarity index 100% rename from components/mbedtls/include/mbedtls/pkcs12.h rename to components/ssl/mbedtls/include/mbedtls/pkcs12.h diff --git a/components/mbedtls/include/mbedtls/pkcs5.h b/components/ssl/mbedtls/include/mbedtls/pkcs5.h similarity index 100% rename from components/mbedtls/include/mbedtls/pkcs5.h rename to components/ssl/mbedtls/include/mbedtls/pkcs5.h diff --git a/components/mbedtls/include/mbedtls/platform.h b/components/ssl/mbedtls/include/mbedtls/platform.h similarity index 100% rename from components/mbedtls/include/mbedtls/platform.h rename to components/ssl/mbedtls/include/mbedtls/platform.h diff --git a/components/mbedtls/include/mbedtls/ripemd160.h b/components/ssl/mbedtls/include/mbedtls/ripemd160.h similarity index 100% rename from components/mbedtls/include/mbedtls/ripemd160.h rename to components/ssl/mbedtls/include/mbedtls/ripemd160.h diff --git a/components/mbedtls/include/mbedtls/rsa.h b/components/ssl/mbedtls/include/mbedtls/rsa.h similarity index 100% rename from components/mbedtls/include/mbedtls/rsa.h rename to components/ssl/mbedtls/include/mbedtls/rsa.h diff --git a/components/mbedtls/include/mbedtls/sha1.h b/components/ssl/mbedtls/include/mbedtls/sha1.h similarity index 100% rename from components/mbedtls/include/mbedtls/sha1.h rename to components/ssl/mbedtls/include/mbedtls/sha1.h diff --git a/components/mbedtls/include/mbedtls/sha256.h b/components/ssl/mbedtls/include/mbedtls/sha256.h similarity index 100% rename from components/mbedtls/include/mbedtls/sha256.h rename to components/ssl/mbedtls/include/mbedtls/sha256.h diff --git a/components/mbedtls/include/mbedtls/sha512.h b/components/ssl/mbedtls/include/mbedtls/sha512.h similarity index 100% rename from components/mbedtls/include/mbedtls/sha512.h rename to components/ssl/mbedtls/include/mbedtls/sha512.h diff --git a/components/mbedtls/include/mbedtls/ssl.h b/components/ssl/mbedtls/include/mbedtls/ssl.h similarity index 100% rename from components/mbedtls/include/mbedtls/ssl.h rename to components/ssl/mbedtls/include/mbedtls/ssl.h diff --git a/components/mbedtls/include/mbedtls/ssl_cache.h b/components/ssl/mbedtls/include/mbedtls/ssl_cache.h similarity index 100% rename from components/mbedtls/include/mbedtls/ssl_cache.h rename to components/ssl/mbedtls/include/mbedtls/ssl_cache.h diff --git a/components/mbedtls/include/mbedtls/ssl_ciphersuites.h b/components/ssl/mbedtls/include/mbedtls/ssl_ciphersuites.h similarity index 100% rename from components/mbedtls/include/mbedtls/ssl_ciphersuites.h rename to components/ssl/mbedtls/include/mbedtls/ssl_ciphersuites.h diff --git a/components/mbedtls/include/mbedtls/ssl_cookie.h b/components/ssl/mbedtls/include/mbedtls/ssl_cookie.h similarity index 100% rename from components/mbedtls/include/mbedtls/ssl_cookie.h rename to components/ssl/mbedtls/include/mbedtls/ssl_cookie.h diff --git a/components/mbedtls/include/mbedtls/ssl_internal.h b/components/ssl/mbedtls/include/mbedtls/ssl_internal.h similarity index 100% rename from components/mbedtls/include/mbedtls/ssl_internal.h rename to components/ssl/mbedtls/include/mbedtls/ssl_internal.h diff --git a/components/mbedtls/include/mbedtls/ssl_ticket.h b/components/ssl/mbedtls/include/mbedtls/ssl_ticket.h similarity index 100% rename from components/mbedtls/include/mbedtls/ssl_ticket.h rename to components/ssl/mbedtls/include/mbedtls/ssl_ticket.h diff --git a/components/mbedtls/include/mbedtls/threading.h b/components/ssl/mbedtls/include/mbedtls/threading.h similarity index 100% rename from components/mbedtls/include/mbedtls/threading.h rename to components/ssl/mbedtls/include/mbedtls/threading.h diff --git a/components/mbedtls/include/mbedtls/timing.h b/components/ssl/mbedtls/include/mbedtls/timing.h similarity index 100% rename from components/mbedtls/include/mbedtls/timing.h rename to components/ssl/mbedtls/include/mbedtls/timing.h diff --git a/components/mbedtls/include/mbedtls/version.h b/components/ssl/mbedtls/include/mbedtls/version.h similarity index 100% rename from components/mbedtls/include/mbedtls/version.h rename to components/ssl/mbedtls/include/mbedtls/version.h diff --git a/components/mbedtls/include/mbedtls/x509.h b/components/ssl/mbedtls/include/mbedtls/x509.h similarity index 100% rename from components/mbedtls/include/mbedtls/x509.h rename to components/ssl/mbedtls/include/mbedtls/x509.h diff --git a/components/mbedtls/include/mbedtls/x509_crl.h b/components/ssl/mbedtls/include/mbedtls/x509_crl.h similarity index 100% rename from components/mbedtls/include/mbedtls/x509_crl.h rename to components/ssl/mbedtls/include/mbedtls/x509_crl.h diff --git a/components/mbedtls/include/mbedtls/x509_crt.h b/components/ssl/mbedtls/include/mbedtls/x509_crt.h similarity index 100% rename from components/mbedtls/include/mbedtls/x509_crt.h rename to components/ssl/mbedtls/include/mbedtls/x509_crt.h diff --git a/components/mbedtls/include/mbedtls/x509_csr.h b/components/ssl/mbedtls/include/mbedtls/x509_csr.h similarity index 100% rename from components/mbedtls/include/mbedtls/x509_csr.h rename to components/ssl/mbedtls/include/mbedtls/x509_csr.h diff --git a/components/mbedtls/include/mbedtls/xtea.h b/components/ssl/mbedtls/include/mbedtls/xtea.h similarity index 100% rename from components/mbedtls/include/mbedtls/xtea.h rename to components/ssl/mbedtls/include/mbedtls/xtea.h diff --git a/components/mbedtls/source/library/aes.c b/components/ssl/mbedtls/source/library/aes.c similarity index 98% rename from components/mbedtls/source/library/aes.c rename to components/ssl/mbedtls/source/library/aes.c index 06300426..d35bcd03 100644 --- a/components/mbedtls/source/library/aes.c +++ b/components/ssl/mbedtls/source/library/aes.c @@ -92,7 +92,7 @@ static int aes_padlock_ace = -1; /* * Forward S-box */ -static const unsigned char FSb[256] ICACHE_RODATA_ATTR STORE_ATTR = +static const unsigned char FSb[256] = { 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, @@ -199,19 +199,19 @@ static const unsigned char FSb[256] ICACHE_RODATA_ATTR STORE_ATTR = V(CB,B0,B0,7B), V(FC,54,54,A8), V(D6,BB,BB,6D), V(3A,16,16,2C) #define V(a,b,c,d) 0x##a##b##c##d -static const uint32_t FT0[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT }; +static const uint32_t FT0[256] = { FT }; #undef V #define V(a,b,c,d) 0x##b##c##d##a -static const uint32_t FT1[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT }; +static const uint32_t FT1[256] = { FT }; #undef V #define V(a,b,c,d) 0x##c##d##a##b -static const uint32_t FT2[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT }; +static const uint32_t FT2[256] = { FT }; #undef V #define V(a,b,c,d) 0x##d##a##b##c -static const uint32_t FT3[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT }; +static const uint32_t FT3[256] = { FT }; #undef V #undef FT @@ -219,7 +219,7 @@ static const uint32_t FT3[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT }; /* * Reverse S-box */ -static const unsigned char RSb[256] ICACHE_RODATA_ATTR STORE_ATTR = +static const unsigned char RSb[256] = { 0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB, @@ -326,19 +326,19 @@ static const unsigned char RSb[256] ICACHE_RODATA_ATTR STORE_ATTR = V(61,84,CB,7B), V(70,B6,32,D5), V(74,5C,6C,48), V(42,57,B8,D0) #define V(a,b,c,d) 0x##a##b##c##d -static const uint32_t RT0[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT }; +static const uint32_t RT0[256] = { RT }; #undef V #define V(a,b,c,d) 0x##b##c##d##a -static const uint32_t RT1[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT }; +static const uint32_t RT1[256] = { RT }; #undef V #define V(a,b,c,d) 0x##c##d##a##b -static const uint32_t RT2[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT }; +static const uint32_t RT2[256] = { RT }; #undef V #define V(a,b,c,d) 0x##d##a##b##c -static const uint32_t RT3[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT }; +static const uint32_t RT3[256] = { RT }; #undef V #undef RT @@ -346,7 +346,7 @@ static const uint32_t RT3[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT }; /* * Round constants */ -static const uint32_t RCON[10] ICACHE_RODATA_ATTR = +static const uint32_t RCON[10] = { 0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010, 0x00000020, 0x00000040, 0x00000080, diff --git a/components/mbedtls/source/library/aesni.c b/components/ssl/mbedtls/source/library/aesni.c similarity index 100% rename from components/mbedtls/source/library/aesni.c rename to components/ssl/mbedtls/source/library/aesni.c diff --git a/components/mbedtls/source/library/arc4.c b/components/ssl/mbedtls/source/library/arc4.c similarity index 100% rename from components/mbedtls/source/library/arc4.c rename to components/ssl/mbedtls/source/library/arc4.c diff --git a/components/mbedtls/source/library/asn1parse.c b/components/ssl/mbedtls/source/library/asn1parse.c similarity index 100% rename from components/mbedtls/source/library/asn1parse.c rename to components/ssl/mbedtls/source/library/asn1parse.c diff --git a/components/mbedtls/source/library/asn1write.c b/components/ssl/mbedtls/source/library/asn1write.c similarity index 100% rename from components/mbedtls/source/library/asn1write.c rename to components/ssl/mbedtls/source/library/asn1write.c diff --git a/components/mbedtls/source/library/base64.c b/components/ssl/mbedtls/source/library/base64.c similarity index 98% rename from components/mbedtls/source/library/base64.c rename to components/ssl/mbedtls/source/library/base64.c index 36be7aa0..ee886fd7 100644 --- a/components/mbedtls/source/library/base64.c +++ b/components/ssl/mbedtls/source/library/base64.c @@ -41,7 +41,7 @@ #endif /* MBEDTLS_PLATFORM_C */ #endif /* MBEDTLS_SELF_TEST */ -static const unsigned char base64_enc_map[64] ICACHE_RODATA_ATTR = +static const unsigned char base64_enc_map[64] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', @@ -52,7 +52,7 @@ static const unsigned char base64_enc_map[64] ICACHE_RODATA_ATTR = '8', '9', '+', '/' }; -static const unsigned char base64_dec_map[128] ICACHE_RODATA_ATTR = +static const unsigned char base64_dec_map[128] = { 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, diff --git a/components/mbedtls/source/library/bignum.c b/components/ssl/mbedtls/source/library/bignum.c similarity index 99% rename from components/mbedtls/source/library/bignum.c rename to components/ssl/mbedtls/source/library/bignum.c index c55fdb87..a6f76332 100644 --- a/components/mbedtls/source/library/bignum.c +++ b/components/ssl/mbedtls/source/library/bignum.c @@ -1968,7 +1968,7 @@ cleanup: #if defined(MBEDTLS_GENPRIME) -static const int small_prime[] ICACHE_RODATA_ATTR STORE_ATTR = +static const int small_prime[] = { 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, diff --git a/components/mbedtls/source/library/blowfish.c b/components/ssl/mbedtls/source/library/blowfish.c similarity index 100% rename from components/mbedtls/source/library/blowfish.c rename to components/ssl/mbedtls/source/library/blowfish.c diff --git a/components/mbedtls/source/library/camellia.c b/components/ssl/mbedtls/source/library/camellia.c similarity index 100% rename from components/mbedtls/source/library/camellia.c rename to components/ssl/mbedtls/source/library/camellia.c diff --git a/components/mbedtls/source/library/ccm.c b/components/ssl/mbedtls/source/library/ccm.c similarity index 100% rename from components/mbedtls/source/library/ccm.c rename to components/ssl/mbedtls/source/library/ccm.c diff --git a/components/mbedtls/source/library/certs.c b/components/ssl/mbedtls/source/library/certs.c similarity index 100% rename from components/mbedtls/source/library/certs.c rename to components/ssl/mbedtls/source/library/certs.c diff --git a/components/mbedtls/source/library/cipher.c b/components/ssl/mbedtls/source/library/cipher.c similarity index 100% rename from components/mbedtls/source/library/cipher.c rename to components/ssl/mbedtls/source/library/cipher.c diff --git a/components/mbedtls/source/library/cipher_wrap.c b/components/ssl/mbedtls/source/library/cipher_wrap.c similarity index 87% rename from components/mbedtls/source/library/cipher_wrap.c rename to components/ssl/mbedtls/source/library/cipher_wrap.c index 814376b7..dc76af8f 100644 --- a/components/mbedtls/source/library/cipher_wrap.c +++ b/components/ssl/mbedtls/source/library/cipher_wrap.c @@ -178,7 +178,7 @@ static void aes_ctx_free( void *ctx ) mbedtls_free( ctx ); } -static const mbedtls_cipher_base_t aes_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t aes_info = { MBEDTLS_CIPHER_ID_AES, aes_crypt_ecb_wrap, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -199,7 +199,7 @@ static const mbedtls_cipher_base_t aes_info ICACHE_RODATA_ATTR = { aes_ctx_free }; -static const mbedtls_cipher_info_t aes_128_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_128_ecb_info = { MBEDTLS_CIPHER_AES_128_ECB, MBEDTLS_MODE_ECB, 128, @@ -210,7 +210,7 @@ static const mbedtls_cipher_info_t aes_128_ecb_info ICACHE_RODATA_ATTR = { &aes_info }; -static const mbedtls_cipher_info_t aes_192_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_192_ecb_info = { MBEDTLS_CIPHER_AES_192_ECB, MBEDTLS_MODE_ECB, 192, @@ -221,7 +221,7 @@ static const mbedtls_cipher_info_t aes_192_ecb_info ICACHE_RODATA_ATTR = { &aes_info }; -static const mbedtls_cipher_info_t aes_256_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_256_ecb_info = { MBEDTLS_CIPHER_AES_256_ECB, MBEDTLS_MODE_ECB, 256, @@ -233,7 +233,7 @@ static const mbedtls_cipher_info_t aes_256_ecb_info ICACHE_RODATA_ATTR = { }; #if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t aes_128_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_128_cbc_info = { MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MODE_CBC, 128, @@ -244,7 +244,7 @@ static const mbedtls_cipher_info_t aes_128_cbc_info ICACHE_RODATA_ATTR = { &aes_info }; -static const mbedtls_cipher_info_t aes_192_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_192_cbc_info = { MBEDTLS_CIPHER_AES_192_CBC, MBEDTLS_MODE_CBC, 192, @@ -255,7 +255,7 @@ static const mbedtls_cipher_info_t aes_192_cbc_info ICACHE_RODATA_ATTR = { &aes_info }; -static const mbedtls_cipher_info_t aes_256_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_256_cbc_info = { MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MODE_CBC, 256, @@ -268,7 +268,7 @@ static const mbedtls_cipher_info_t aes_256_cbc_info ICACHE_RODATA_ATTR = { #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) -static const mbedtls_cipher_info_t aes_128_cfb128_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_128_cfb128_info = { MBEDTLS_CIPHER_AES_128_CFB128, MBEDTLS_MODE_CFB, 128, @@ -279,7 +279,7 @@ static const mbedtls_cipher_info_t aes_128_cfb128_info ICACHE_RODATA_ATTR = { &aes_info }; -static const mbedtls_cipher_info_t aes_192_cfb128_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_192_cfb128_info = { MBEDTLS_CIPHER_AES_192_CFB128, MBEDTLS_MODE_CFB, 192, @@ -290,7 +290,7 @@ static const mbedtls_cipher_info_t aes_192_cfb128_info ICACHE_RODATA_ATTR = { &aes_info }; -static const mbedtls_cipher_info_t aes_256_cfb128_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_256_cfb128_info = { MBEDTLS_CIPHER_AES_256_CFB128, MBEDTLS_MODE_CFB, 256, @@ -303,7 +303,7 @@ static const mbedtls_cipher_info_t aes_256_cfb128_info ICACHE_RODATA_ATTR = { #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) -static const mbedtls_cipher_info_t aes_128_ctr_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_128_ctr_info = { MBEDTLS_CIPHER_AES_128_CTR, MBEDTLS_MODE_CTR, 128, @@ -314,7 +314,7 @@ static const mbedtls_cipher_info_t aes_128_ctr_info ICACHE_RODATA_ATTR = { &aes_info }; -static const mbedtls_cipher_info_t aes_192_ctr_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_192_ctr_info = { MBEDTLS_CIPHER_AES_192_CTR, MBEDTLS_MODE_CTR, 192, @@ -325,7 +325,7 @@ static const mbedtls_cipher_info_t aes_192_ctr_info ICACHE_RODATA_ATTR = { &aes_info }; -static const mbedtls_cipher_info_t aes_256_ctr_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_256_ctr_info = { MBEDTLS_CIPHER_AES_256_CTR, MBEDTLS_MODE_CTR, 256, @@ -345,7 +345,7 @@ static int gcm_aes_setkey_wrap( void *ctx, const unsigned char *key, key, key_bitlen ); } -static const mbedtls_cipher_base_t gcm_aes_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t gcm_aes_info = { MBEDTLS_CIPHER_ID_AES, NULL, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -366,7 +366,7 @@ static const mbedtls_cipher_base_t gcm_aes_info ICACHE_RODATA_ATTR = { gcm_ctx_free, }; -static const mbedtls_cipher_info_t aes_128_gcm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_128_gcm_info = { MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MODE_GCM, 128, @@ -377,7 +377,7 @@ static const mbedtls_cipher_info_t aes_128_gcm_info ICACHE_RODATA_ATTR = { &gcm_aes_info }; -static const mbedtls_cipher_info_t aes_192_gcm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_192_gcm_info = { MBEDTLS_CIPHER_AES_192_GCM, MBEDTLS_MODE_GCM, 192, @@ -388,7 +388,7 @@ static const mbedtls_cipher_info_t aes_192_gcm_info ICACHE_RODATA_ATTR = { &gcm_aes_info }; -static const mbedtls_cipher_info_t aes_256_gcm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_256_gcm_info = { MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MODE_GCM, 256, @@ -408,7 +408,7 @@ static int ccm_aes_setkey_wrap( void *ctx, const unsigned char *key, key, key_bitlen ); } -static const mbedtls_cipher_base_t ccm_aes_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t ccm_aes_info = { MBEDTLS_CIPHER_ID_AES, NULL, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -429,7 +429,7 @@ static const mbedtls_cipher_base_t ccm_aes_info ICACHE_RODATA_ATTR = { ccm_ctx_free, }; -static const mbedtls_cipher_info_t aes_128_ccm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_128_ccm_info = { MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MODE_CCM, 128, @@ -440,7 +440,7 @@ static const mbedtls_cipher_info_t aes_128_ccm_info ICACHE_RODATA_ATTR = { &ccm_aes_info }; -static const mbedtls_cipher_info_t aes_192_ccm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_192_ccm_info = { MBEDTLS_CIPHER_AES_192_CCM, MBEDTLS_MODE_CCM, 192, @@ -451,7 +451,7 @@ static const mbedtls_cipher_info_t aes_192_ccm_info ICACHE_RODATA_ATTR = { &ccm_aes_info }; -static const mbedtls_cipher_info_t aes_256_ccm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t aes_256_ccm_info = { MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MODE_CCM, 256, @@ -535,7 +535,7 @@ static void camellia_ctx_free( void *ctx ) mbedtls_free( ctx ); } -static const mbedtls_cipher_base_t camellia_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t camellia_info = { MBEDTLS_CIPHER_ID_CAMELLIA, camellia_crypt_ecb_wrap, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -556,7 +556,7 @@ static const mbedtls_cipher_base_t camellia_info ICACHE_RODATA_ATTR = { camellia_ctx_free }; -static const mbedtls_cipher_info_t camellia_128_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_128_ecb_info = { MBEDTLS_CIPHER_CAMELLIA_128_ECB, MBEDTLS_MODE_ECB, 128, @@ -567,7 +567,7 @@ static const mbedtls_cipher_info_t camellia_128_ecb_info ICACHE_RODATA_ATTR = { &camellia_info }; -static const mbedtls_cipher_info_t camellia_192_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_192_ecb_info = { MBEDTLS_CIPHER_CAMELLIA_192_ECB, MBEDTLS_MODE_ECB, 192, @@ -578,7 +578,7 @@ static const mbedtls_cipher_info_t camellia_192_ecb_info ICACHE_RODATA_ATTR = { &camellia_info }; -static const mbedtls_cipher_info_t camellia_256_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_256_ecb_info = { MBEDTLS_CIPHER_CAMELLIA_256_ECB, MBEDTLS_MODE_ECB, 256, @@ -590,7 +590,7 @@ static const mbedtls_cipher_info_t camellia_256_ecb_info ICACHE_RODATA_ATTR = { }; #if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t camellia_128_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_128_cbc_info = { MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MODE_CBC, 128, @@ -601,7 +601,7 @@ static const mbedtls_cipher_info_t camellia_128_cbc_info ICACHE_RODATA_ATTR = { &camellia_info }; -static const mbedtls_cipher_info_t camellia_192_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_192_cbc_info = { MBEDTLS_CIPHER_CAMELLIA_192_CBC, MBEDTLS_MODE_CBC, 192, @@ -612,7 +612,7 @@ static const mbedtls_cipher_info_t camellia_192_cbc_info ICACHE_RODATA_ATTR = { &camellia_info }; -static const mbedtls_cipher_info_t camellia_256_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_256_cbc_info = { MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MODE_CBC, 256, @@ -625,7 +625,7 @@ static const mbedtls_cipher_info_t camellia_256_cbc_info ICACHE_RODATA_ATTR = { #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) -static const mbedtls_cipher_info_t camellia_128_cfb128_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_128_cfb128_info = { MBEDTLS_CIPHER_CAMELLIA_128_CFB128, MBEDTLS_MODE_CFB, 128, @@ -636,7 +636,7 @@ static const mbedtls_cipher_info_t camellia_128_cfb128_info ICACHE_RODATA_ATTR = &camellia_info }; -static const mbedtls_cipher_info_t camellia_192_cfb128_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_192_cfb128_info = { MBEDTLS_CIPHER_CAMELLIA_192_CFB128, MBEDTLS_MODE_CFB, 192, @@ -647,7 +647,7 @@ static const mbedtls_cipher_info_t camellia_192_cfb128_info ICACHE_RODATA_ATTR = &camellia_info }; -static const mbedtls_cipher_info_t camellia_256_cfb128_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_256_cfb128_info = { MBEDTLS_CIPHER_CAMELLIA_256_CFB128, MBEDTLS_MODE_CFB, 256, @@ -660,7 +660,7 @@ static const mbedtls_cipher_info_t camellia_256_cfb128_info ICACHE_RODATA_ATTR = #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) -static const mbedtls_cipher_info_t camellia_128_ctr_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_128_ctr_info = { MBEDTLS_CIPHER_CAMELLIA_128_CTR, MBEDTLS_MODE_CTR, 128, @@ -671,7 +671,7 @@ static const mbedtls_cipher_info_t camellia_128_ctr_info ICACHE_RODATA_ATTR = { &camellia_info }; -static const mbedtls_cipher_info_t camellia_192_ctr_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_192_ctr_info = { MBEDTLS_CIPHER_CAMELLIA_192_CTR, MBEDTLS_MODE_CTR, 192, @@ -682,7 +682,7 @@ static const mbedtls_cipher_info_t camellia_192_ctr_info ICACHE_RODATA_ATTR = { &camellia_info }; -static const mbedtls_cipher_info_t camellia_256_ctr_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_256_ctr_info = { MBEDTLS_CIPHER_CAMELLIA_256_CTR, MBEDTLS_MODE_CTR, 256, @@ -702,7 +702,7 @@ static int gcm_camellia_setkey_wrap( void *ctx, const unsigned char *key, key, key_bitlen ); } -static const mbedtls_cipher_base_t gcm_camellia_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t gcm_camellia_info = { MBEDTLS_CIPHER_ID_CAMELLIA, NULL, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -723,7 +723,7 @@ static const mbedtls_cipher_base_t gcm_camellia_info ICACHE_RODATA_ATTR = { gcm_ctx_free, }; -static const mbedtls_cipher_info_t camellia_128_gcm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_128_gcm_info = { MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MODE_GCM, 128, @@ -734,7 +734,7 @@ static const mbedtls_cipher_info_t camellia_128_gcm_info ICACHE_RODATA_ATTR = { &gcm_camellia_info }; -static const mbedtls_cipher_info_t camellia_192_gcm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_192_gcm_info = { MBEDTLS_CIPHER_CAMELLIA_192_GCM, MBEDTLS_MODE_GCM, 192, @@ -745,7 +745,7 @@ static const mbedtls_cipher_info_t camellia_192_gcm_info ICACHE_RODATA_ATTR = { &gcm_camellia_info }; -static const mbedtls_cipher_info_t camellia_256_gcm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_256_gcm_info = { MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MODE_GCM, 256, @@ -765,7 +765,7 @@ static int ccm_camellia_setkey_wrap( void *ctx, const unsigned char *key, key, key_bitlen ); } -static const mbedtls_cipher_base_t ccm_camellia_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t ccm_camellia_info = { MBEDTLS_CIPHER_ID_CAMELLIA, NULL, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -786,7 +786,7 @@ static const mbedtls_cipher_base_t ccm_camellia_info ICACHE_RODATA_ATTR = { ccm_ctx_free, }; -static const mbedtls_cipher_info_t camellia_128_ccm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_128_ccm_info = { MBEDTLS_CIPHER_CAMELLIA_128_CCM, MBEDTLS_MODE_CCM, 128, @@ -797,7 +797,7 @@ static const mbedtls_cipher_info_t camellia_128_ccm_info ICACHE_RODATA_ATTR = { &ccm_camellia_info }; -static const mbedtls_cipher_info_t camellia_192_ccm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_192_ccm_info = { MBEDTLS_CIPHER_CAMELLIA_192_CCM, MBEDTLS_MODE_CCM, 192, @@ -808,7 +808,7 @@ static const mbedtls_cipher_info_t camellia_192_ccm_info ICACHE_RODATA_ATTR = { &ccm_camellia_info }; -static const mbedtls_cipher_info_t camellia_256_ccm_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t camellia_256_ccm_info = { MBEDTLS_CIPHER_CAMELLIA_256_CCM, MBEDTLS_MODE_CCM, 256, @@ -941,7 +941,7 @@ static void des3_ctx_free( void *ctx ) mbedtls_free( ctx ); } -static const mbedtls_cipher_base_t des_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t des_info = { MBEDTLS_CIPHER_ID_DES, des_crypt_ecb_wrap, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -962,7 +962,7 @@ static const mbedtls_cipher_base_t des_info ICACHE_RODATA_ATTR = { des_ctx_free }; -static const mbedtls_cipher_info_t des_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t des_ecb_info = { MBEDTLS_CIPHER_DES_ECB, MBEDTLS_MODE_ECB, MBEDTLS_KEY_LENGTH_DES, @@ -974,7 +974,7 @@ static const mbedtls_cipher_info_t des_ecb_info ICACHE_RODATA_ATTR = { }; #if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t des_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t des_cbc_info = { MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MODE_CBC, MBEDTLS_KEY_LENGTH_DES, @@ -986,7 +986,7 @@ static const mbedtls_cipher_info_t des_cbc_info ICACHE_RODATA_ATTR = { }; #endif /* MBEDTLS_CIPHER_MODE_CBC */ -static const mbedtls_cipher_base_t des_ede_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t des_ede_info = { MBEDTLS_CIPHER_ID_DES, des3_crypt_ecb_wrap, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -1007,7 +1007,7 @@ static const mbedtls_cipher_base_t des_ede_info ICACHE_RODATA_ATTR = { des3_ctx_free }; -static const mbedtls_cipher_info_t des_ede_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t des_ede_ecb_info = { MBEDTLS_CIPHER_DES_EDE_ECB, MBEDTLS_MODE_ECB, MBEDTLS_KEY_LENGTH_DES_EDE, @@ -1019,7 +1019,7 @@ static const mbedtls_cipher_info_t des_ede_ecb_info ICACHE_RODATA_ATTR = { }; #if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t des_ede_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t des_ede_cbc_info = { MBEDTLS_CIPHER_DES_EDE_CBC, MBEDTLS_MODE_CBC, MBEDTLS_KEY_LENGTH_DES_EDE, @@ -1031,7 +1031,7 @@ static const mbedtls_cipher_info_t des_ede_cbc_info ICACHE_RODATA_ATTR = { }; #endif /* MBEDTLS_CIPHER_MODE_CBC */ -static const mbedtls_cipher_base_t des_ede3_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t des_ede3_info = { MBEDTLS_CIPHER_ID_3DES, des3_crypt_ecb_wrap, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -1052,7 +1052,7 @@ static const mbedtls_cipher_base_t des_ede3_info ICACHE_RODATA_ATTR = { des3_ctx_free }; -static const mbedtls_cipher_info_t des_ede3_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t des_ede3_ecb_info = { MBEDTLS_CIPHER_DES_EDE3_ECB, MBEDTLS_MODE_ECB, MBEDTLS_KEY_LENGTH_DES_EDE3, @@ -1063,7 +1063,7 @@ static const mbedtls_cipher_info_t des_ede3_ecb_info ICACHE_RODATA_ATTR = { &des_ede3_info }; #if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t des_ede3_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t des_ede3_cbc_info = { MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MODE_CBC, MBEDTLS_KEY_LENGTH_DES_EDE3, @@ -1140,7 +1140,7 @@ static void blowfish_ctx_free( void *ctx ) mbedtls_free( ctx ); } -static const mbedtls_cipher_base_t blowfish_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t blowfish_info = { MBEDTLS_CIPHER_ID_BLOWFISH, blowfish_crypt_ecb_wrap, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -1161,7 +1161,7 @@ static const mbedtls_cipher_base_t blowfish_info ICACHE_RODATA_ATTR = { blowfish_ctx_free }; -static const mbedtls_cipher_info_t blowfish_ecb_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t blowfish_ecb_info = { MBEDTLS_CIPHER_BLOWFISH_ECB, MBEDTLS_MODE_ECB, 128, @@ -1173,7 +1173,7 @@ static const mbedtls_cipher_info_t blowfish_ecb_info ICACHE_RODATA_ATTR = { }; #if defined(MBEDTLS_CIPHER_MODE_CBC) -static const mbedtls_cipher_info_t blowfish_cbc_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t blowfish_cbc_info = { MBEDTLS_CIPHER_BLOWFISH_CBC, MBEDTLS_MODE_CBC, 128, @@ -1186,7 +1186,7 @@ static const mbedtls_cipher_info_t blowfish_cbc_info ICACHE_RODATA_ATTR = { #endif /* MBEDTLS_CIPHER_MODE_CBC */ #if defined(MBEDTLS_CIPHER_MODE_CFB) -static const mbedtls_cipher_info_t blowfish_cfb64_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t blowfish_cfb64_info = { MBEDTLS_CIPHER_BLOWFISH_CFB64, MBEDTLS_MODE_CFB, 128, @@ -1199,7 +1199,7 @@ static const mbedtls_cipher_info_t blowfish_cfb64_info ICACHE_RODATA_ATTR = { #endif /* MBEDTLS_CIPHER_MODE_CFB */ #if defined(MBEDTLS_CIPHER_MODE_CTR) -static const mbedtls_cipher_info_t blowfish_ctr_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t blowfish_ctr_info = { MBEDTLS_CIPHER_BLOWFISH_CTR, MBEDTLS_MODE_CTR, 128, @@ -1250,7 +1250,7 @@ static void arc4_ctx_free( void *ctx ) mbedtls_free( ctx ); } -static const mbedtls_cipher_base_t arc4_base_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t arc4_base_info = { MBEDTLS_CIPHER_ID_ARC4, NULL, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -1271,7 +1271,7 @@ static const mbedtls_cipher_base_t arc4_base_info ICACHE_RODATA_ATTR = { arc4_ctx_free }; -static const mbedtls_cipher_info_t arc4_128_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t arc4_128_info = { MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MODE_STREAM, 128, @@ -1313,7 +1313,7 @@ static void null_ctx_free( void *ctx ) ((void) ctx); } -static const mbedtls_cipher_base_t null_base_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_base_t null_base_info = { MBEDTLS_CIPHER_ID_NULL, NULL, #if defined(MBEDTLS_CIPHER_MODE_CBC) @@ -1334,7 +1334,7 @@ static const mbedtls_cipher_base_t null_base_info ICACHE_RODATA_ATTR = { null_ctx_free }; -static const mbedtls_cipher_info_t null_cipher_info ICACHE_RODATA_ATTR = { +static const mbedtls_cipher_info_t null_cipher_info = { MBEDTLS_CIPHER_NULL, MBEDTLS_MODE_STREAM, 0, @@ -1346,7 +1346,7 @@ static const mbedtls_cipher_info_t null_cipher_info ICACHE_RODATA_ATTR = { }; #endif /* defined(MBEDTLS_CIPHER_NULL_CIPHER) */ -const mbedtls_cipher_definition_t mbedtls_cipher_definitions[] ICACHE_RODATA_ATTR = +const mbedtls_cipher_definition_t mbedtls_cipher_definitions[] = { #if defined(MBEDTLS_AES_C) { MBEDTLS_CIPHER_AES_128_ECB, &aes_128_ecb_info }, diff --git a/components/mbedtls/source/library/ctr_drbg.c b/components/ssl/mbedtls/source/library/ctr_drbg.c similarity index 100% rename from components/mbedtls/source/library/ctr_drbg.c rename to components/ssl/mbedtls/source/library/ctr_drbg.c diff --git a/components/mbedtls/source/library/debug.c b/components/ssl/mbedtls/source/library/debug.c similarity index 100% rename from components/mbedtls/source/library/debug.c rename to components/ssl/mbedtls/source/library/debug.c diff --git a/components/mbedtls/source/library/des.c b/components/ssl/mbedtls/source/library/des.c similarity index 100% rename from components/mbedtls/source/library/des.c rename to components/ssl/mbedtls/source/library/des.c diff --git a/components/mbedtls/source/library/dhm.c b/components/ssl/mbedtls/source/library/dhm.c similarity index 100% rename from components/mbedtls/source/library/dhm.c rename to components/ssl/mbedtls/source/library/dhm.c diff --git a/components/mbedtls/source/library/ecdh.c b/components/ssl/mbedtls/source/library/ecdh.c similarity index 100% rename from components/mbedtls/source/library/ecdh.c rename to components/ssl/mbedtls/source/library/ecdh.c diff --git a/components/mbedtls/source/library/ecdsa.c b/components/ssl/mbedtls/source/library/ecdsa.c similarity index 100% rename from components/mbedtls/source/library/ecdsa.c rename to components/ssl/mbedtls/source/library/ecdsa.c diff --git a/components/mbedtls/source/library/ecjpake.c b/components/ssl/mbedtls/source/library/ecjpake.c similarity index 100% rename from components/mbedtls/source/library/ecjpake.c rename to components/ssl/mbedtls/source/library/ecjpake.c diff --git a/components/mbedtls/source/library/ecp.c b/components/ssl/mbedtls/source/library/ecp.c similarity index 100% rename from components/mbedtls/source/library/ecp.c rename to components/ssl/mbedtls/source/library/ecp.c diff --git a/components/mbedtls/source/library/ecp_curves.c b/components/ssl/mbedtls/source/library/ecp_curves.c similarity index 100% rename from components/mbedtls/source/library/ecp_curves.c rename to components/ssl/mbedtls/source/library/ecp_curves.c diff --git a/components/mbedtls/source/library/entropy.c b/components/ssl/mbedtls/source/library/entropy.c similarity index 100% rename from components/mbedtls/source/library/entropy.c rename to components/ssl/mbedtls/source/library/entropy.c diff --git a/components/mbedtls/source/library/entropy_poll.c b/components/ssl/mbedtls/source/library/entropy_poll.c similarity index 100% rename from components/mbedtls/source/library/entropy_poll.c rename to components/ssl/mbedtls/source/library/entropy_poll.c diff --git a/components/mbedtls/source/library/error.c b/components/ssl/mbedtls/source/library/error.c similarity index 100% rename from components/mbedtls/source/library/error.c rename to components/ssl/mbedtls/source/library/error.c diff --git a/components/mbedtls/source/library/gcm.c b/components/ssl/mbedtls/source/library/gcm.c similarity index 100% rename from components/mbedtls/source/library/gcm.c rename to components/ssl/mbedtls/source/library/gcm.c diff --git a/components/mbedtls/source/library/havege.c b/components/ssl/mbedtls/source/library/havege.c similarity index 100% rename from components/mbedtls/source/library/havege.c rename to components/ssl/mbedtls/source/library/havege.c diff --git a/components/mbedtls/source/library/hmac_drbg.c b/components/ssl/mbedtls/source/library/hmac_drbg.c similarity index 100% rename from components/mbedtls/source/library/hmac_drbg.c rename to components/ssl/mbedtls/source/library/hmac_drbg.c diff --git a/components/mbedtls/source/library/md.c b/components/ssl/mbedtls/source/library/md.c similarity index 99% rename from components/mbedtls/source/library/md.c rename to components/ssl/mbedtls/source/library/md.c index 9c2ab6fc..d63e1bc0 100644 --- a/components/mbedtls/source/library/md.c +++ b/components/ssl/mbedtls/source/library/md.c @@ -56,7 +56,7 @@ static void mbedtls_zeroize( void *v, size_t n ) { /* * Reminder: update profiles in x509_crt.c when adding a new hash! */ -static const int supported_digests[] ICACHE_RODATA_ATTR = { +static const int supported_digests[] = { #if defined(MBEDTLS_SHA512_C) MBEDTLS_MD_SHA512, diff --git a/components/mbedtls/source/library/md2.c b/components/ssl/mbedtls/source/library/md2.c similarity index 100% rename from components/mbedtls/source/library/md2.c rename to components/ssl/mbedtls/source/library/md2.c diff --git a/components/mbedtls/source/library/md4.c b/components/ssl/mbedtls/source/library/md4.c similarity index 100% rename from components/mbedtls/source/library/md4.c rename to components/ssl/mbedtls/source/library/md4.c diff --git a/components/mbedtls/source/library/md5.c b/components/ssl/mbedtls/source/library/md5.c similarity index 99% rename from components/mbedtls/source/library/md5.c rename to components/ssl/mbedtls/source/library/md5.c index c36192f3..efc93dc5 100644 --- a/components/mbedtls/source/library/md5.c +++ b/components/ssl/mbedtls/source/library/md5.c @@ -275,7 +275,7 @@ void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, s } } -static const unsigned char md5_padding[64] ICACHE_RODATA_ATTR = +static const unsigned char md5_padding[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/components/mbedtls/source/library/md_wrap.c b/components/ssl/mbedtls/source/library/md_wrap.c similarity index 97% rename from components/mbedtls/source/library/md_wrap.c rename to components/ssl/mbedtls/source/library/md_wrap.c index 3d211598..2cfcae20 100644 --- a/components/mbedtls/source/library/md_wrap.c +++ b/components/ssl/mbedtls/source/library/md_wrap.c @@ -240,7 +240,7 @@ static void md5_process_wrap( void *ctx, const unsigned char *data ) mbedtls_md5_process( (mbedtls_md5_context *) ctx, data ); } -const mbedtls_md_info_t mbedtls_md5_info ICACHE_RODATA_ATTR = { +const mbedtls_md_info_t mbedtls_md5_info = { MBEDTLS_MD_MD5, "MD5", 16, @@ -364,7 +364,7 @@ static void sha1_process_wrap( void *ctx, const unsigned char *data ) mbedtls_sha1_process( (mbedtls_sha1_context *) ctx, data ); } -const mbedtls_md_info_t mbedtls_sha1_info ICACHE_RODATA_ATTR = { +const mbedtls_md_info_t mbedtls_sha1_info = { MBEDTLS_MD_SHA1, "SHA1", 20, @@ -435,7 +435,7 @@ static void sha224_process_wrap( void *ctx, const unsigned char *data ) mbedtls_sha256_process( (mbedtls_sha256_context *) ctx, data ); } -const mbedtls_md_info_t mbedtls_sha224_info ICACHE_RODATA_ATTR = { +const mbedtls_md_info_t mbedtls_sha224_info = { MBEDTLS_MD_SHA224, "SHA224", 28, @@ -461,7 +461,7 @@ static void sha256_wrap( const unsigned char *input, size_t ilen, mbedtls_sha256( input, ilen, output, 0 ); } -const mbedtls_md_info_t mbedtls_sha256_info ICACHE_RODATA_ATTR = { +const mbedtls_md_info_t mbedtls_sha256_info = { MBEDTLS_MD_SHA256, "SHA256", 32, @@ -529,7 +529,7 @@ static void sha384_process_wrap( void *ctx, const unsigned char *data ) mbedtls_sha512_process( (mbedtls_sha512_context *) ctx, data ); } -const mbedtls_md_info_t mbedtls_sha384_info ICACHE_RODATA_ATTR = { +const mbedtls_md_info_t mbedtls_sha384_info = { MBEDTLS_MD_SHA384, "SHA384", 48, @@ -555,7 +555,7 @@ static void sha512_wrap( const unsigned char *input, size_t ilen, mbedtls_sha512( input, ilen, output, 0 ); } -const mbedtls_md_info_t mbedtls_sha512_info ICACHE_RODATA_ATTR = { +const mbedtls_md_info_t mbedtls_sha512_info = { MBEDTLS_MD_SHA512, "SHA512", 64, diff --git a/components/mbedtls/source/library/memory_buffer_alloc.c b/components/ssl/mbedtls/source/library/memory_buffer_alloc.c similarity index 100% rename from components/mbedtls/source/library/memory_buffer_alloc.c rename to components/ssl/mbedtls/source/library/memory_buffer_alloc.c diff --git a/components/mbedtls/source/library/net.c b/components/ssl/mbedtls/source/library/net.c similarity index 100% rename from components/mbedtls/source/library/net.c rename to components/ssl/mbedtls/source/library/net.c diff --git a/components/mbedtls/source/library/oid.c b/components/ssl/mbedtls/source/library/oid.c similarity index 97% rename from components/mbedtls/source/library/oid.c rename to components/ssl/mbedtls/source/library/oid.c index 0d606c69..0d443262 100644 --- a/components/mbedtls/source/library/oid.c +++ b/components/ssl/mbedtls/source/library/oid.c @@ -160,7 +160,7 @@ typedef struct { const char *short_name; } oid_x520_attr_t; -static const oid_x520_attr_t oid_x520_attr_type[] ICACHE_RODATA_ATTR = +static const oid_x520_attr_t oid_x520_attr_type[] = { { { ADD_LEN( MBEDTLS_OID_AT_CN ), "id-at-commonName", "Common Name" }, @@ -256,7 +256,7 @@ typedef struct { int ext_type; } oid_x509_ext_t; -static const oid_x509_ext_t oid_x509_ext[] ICACHE_RODATA_ATTR = +static const oid_x509_ext_t oid_x509_ext[] = { { { ADD_LEN( MBEDTLS_OID_BASIC_CONSTRAINTS ), "id-ce-basicConstraints", "Basic Constraints" }, @@ -287,7 +287,7 @@ static const oid_x509_ext_t oid_x509_ext[] ICACHE_RODATA_ATTR = FN_OID_TYPED_FROM_ASN1(oid_x509_ext_t, x509_ext, oid_x509_ext) FN_OID_GET_ATTR1(mbedtls_oid_get_x509_ext_type, oid_x509_ext_t, x509_ext, int, ext_type) -static const mbedtls_oid_descriptor_t oid_ext_key_usage[] ICACHE_RODATA_ATTR = +static const mbedtls_oid_descriptor_t oid_ext_key_usage[] = { { ADD_LEN( MBEDTLS_OID_SERVER_AUTH ), "id-kp-serverAuth", "TLS Web Server Authentication" }, { ADD_LEN( MBEDTLS_OID_CLIENT_AUTH ), "id-kp-clientAuth", "TLS Web Client Authentication" }, @@ -312,7 +312,7 @@ typedef struct { mbedtls_pk_type_t pk_alg; } oid_sig_alg_t; -static const oid_sig_alg_t oid_sig_alg[] ICACHE_RODATA_ATTR = +static const oid_sig_alg_t oid_sig_alg[] = { { { ADD_LEN( MBEDTLS_OID_PKCS1_MD2 ), "md2WithRSAEncryption", "RSA with MD2" }, @@ -394,7 +394,7 @@ typedef struct { mbedtls_pk_type_t pk_alg; } oid_pk_alg_t; -static const oid_pk_alg_t oid_pk_alg[] ICACHE_RODATA_ATTR = +static const oid_pk_alg_t oid_pk_alg[] = { { { ADD_LEN( MBEDTLS_OID_PKCS1_RSA ), "rsaEncryption", "RSA" }, @@ -427,7 +427,7 @@ typedef struct { mbedtls_ecp_group_id grp_id; } oid_ecp_grp_t; -static const oid_ecp_grp_t oid_ecp_grp[] ICACHE_RODATA_ATTR = +static const oid_ecp_grp_t oid_ecp_grp[] = { { { ADD_LEN( MBEDTLS_OID_EC_GRP_SECP192R1 ), "secp192r1", "secp192r1" }, @@ -493,7 +493,7 @@ typedef struct { mbedtls_cipher_type_t cipher_alg; } oid_cipher_alg_t; -static const oid_cipher_alg_t oid_cipher_alg[] ICACHE_RODATA_ATTR = +static const oid_cipher_alg_t oid_cipher_alg[] = { { { ADD_LEN( MBEDTLS_OID_DES_CBC ), "desCBC", "DES-CBC" }, @@ -522,7 +522,7 @@ typedef struct { mbedtls_md_type_t md_alg; } oid_md_alg_t; -static const oid_md_alg_t oid_md_alg[] ICACHE_RODATA_ATTR = +static const oid_md_alg_t oid_md_alg[] = { { { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_MD2 ), "id-md2", "MD2" }, @@ -577,7 +577,7 @@ typedef struct { mbedtls_cipher_type_t cipher_alg; } oid_pkcs12_pbe_alg_t; -static const oid_pkcs12_pbe_alg_t oid_pkcs12_pbe_alg[] ICACHE_RODATA_ATTR = +static const oid_pkcs12_pbe_alg_t oid_pkcs12_pbe_alg[] = { { { ADD_LEN( MBEDTLS_OID_PKCS12_PBE_SHA1_DES3_EDE_CBC ), "pbeWithSHAAnd3-KeyTripleDES-CBC", "PBE with SHA1 and 3-Key 3DES" }, diff --git a/components/mbedtls/source/library/padlock.c b/components/ssl/mbedtls/source/library/padlock.c similarity index 100% rename from components/mbedtls/source/library/padlock.c rename to components/ssl/mbedtls/source/library/padlock.c diff --git a/components/mbedtls/source/library/pem.c b/components/ssl/mbedtls/source/library/pem.c similarity index 100% rename from components/mbedtls/source/library/pem.c rename to components/ssl/mbedtls/source/library/pem.c diff --git a/components/mbedtls/source/library/pk.c b/components/ssl/mbedtls/source/library/pk.c similarity index 100% rename from components/mbedtls/source/library/pk.c rename to components/ssl/mbedtls/source/library/pk.c diff --git a/components/mbedtls/source/library/pk_wrap.c b/components/ssl/mbedtls/source/library/pk_wrap.c similarity index 97% rename from components/mbedtls/source/library/pk_wrap.c rename to components/ssl/mbedtls/source/library/pk_wrap.c index 626c3b9c..712ad483 100644 --- a/components/mbedtls/source/library/pk_wrap.c +++ b/components/ssl/mbedtls/source/library/pk_wrap.c @@ -160,7 +160,7 @@ static void rsa_debug( const void *ctx, mbedtls_pk_debug_item *items ) items->value = &( ((mbedtls_rsa_context *) ctx)->E ); } -const mbedtls_pk_info_t mbedtls_rsa_info ICACHE_RODATA_ATTR = { +const mbedtls_pk_info_t mbedtls_rsa_info = { MBEDTLS_PK_RSA, "RSA", rsa_get_bitlen, @@ -270,7 +270,7 @@ static void eckey_debug( const void *ctx, mbedtls_pk_debug_item *items ) items->value = &( ((mbedtls_ecp_keypair *) ctx)->Q ); } -const mbedtls_pk_info_t mbedtls_eckey_info ICACHE_RODATA_ATTR = { +const mbedtls_pk_info_t mbedtls_eckey_info = { MBEDTLS_PK_ECKEY, "EC", eckey_get_bitlen, @@ -299,7 +299,7 @@ static int eckeydh_can_do( mbedtls_pk_type_t type ) type == MBEDTLS_PK_ECKEY_DH ); } -const mbedtls_pk_info_t mbedtls_eckeydh_info ICACHE_RODATA_ATTR = { +const mbedtls_pk_info_t mbedtls_eckeydh_info = { MBEDTLS_PK_ECKEY_DH, "EC_DH", eckey_get_bitlen, /* Same underlying key structure */ @@ -362,7 +362,7 @@ static void ecdsa_free_wrap( void *ctx ) mbedtls_free( ctx ); } -const mbedtls_pk_info_t mbedtls_ecdsa_info ICACHE_RODATA_ATTR = { +const mbedtls_pk_info_t mbedtls_ecdsa_info = { MBEDTLS_PK_ECDSA, "ECDSA", eckey_get_bitlen, /* Compatible key structures */ @@ -471,7 +471,7 @@ static void rsa_alt_free_wrap( void *ctx ) mbedtls_free( ctx ); } -const mbedtls_pk_info_t mbedtls_rsa_alt_info ICACHE_RODATA_ATTR = { +const mbedtls_pk_info_t mbedtls_rsa_alt_info = { MBEDTLS_PK_RSA_ALT, "RSA-alt", rsa_alt_get_bitlen, diff --git a/components/mbedtls/source/library/pkcs11.c b/components/ssl/mbedtls/source/library/pkcs11.c similarity index 100% rename from components/mbedtls/source/library/pkcs11.c rename to components/ssl/mbedtls/source/library/pkcs11.c diff --git a/components/mbedtls/source/library/pkcs12.c b/components/ssl/mbedtls/source/library/pkcs12.c similarity index 100% rename from components/mbedtls/source/library/pkcs12.c rename to components/ssl/mbedtls/source/library/pkcs12.c diff --git a/components/mbedtls/source/library/pkcs5.c b/components/ssl/mbedtls/source/library/pkcs5.c similarity index 100% rename from components/mbedtls/source/library/pkcs5.c rename to components/ssl/mbedtls/source/library/pkcs5.c diff --git a/components/mbedtls/source/library/pkparse.c b/components/ssl/mbedtls/source/library/pkparse.c similarity index 100% rename from components/mbedtls/source/library/pkparse.c rename to components/ssl/mbedtls/source/library/pkparse.c diff --git a/components/mbedtls/source/library/pkwrite.c b/components/ssl/mbedtls/source/library/pkwrite.c similarity index 100% rename from components/mbedtls/source/library/pkwrite.c rename to components/ssl/mbedtls/source/library/pkwrite.c diff --git a/components/mbedtls/source/library/platform.c b/components/ssl/mbedtls/source/library/platform.c similarity index 100% rename from components/mbedtls/source/library/platform.c rename to components/ssl/mbedtls/source/library/platform.c diff --git a/components/mbedtls/source/library/ripemd160.c b/components/ssl/mbedtls/source/library/ripemd160.c similarity index 100% rename from components/mbedtls/source/library/ripemd160.c rename to components/ssl/mbedtls/source/library/ripemd160.c diff --git a/components/mbedtls/source/library/rsa.c b/components/ssl/mbedtls/source/library/rsa.c similarity index 100% rename from components/mbedtls/source/library/rsa.c rename to components/ssl/mbedtls/source/library/rsa.c diff --git a/components/mbedtls/source/library/sha1.c b/components/ssl/mbedtls/source/library/sha1.c similarity index 99% rename from components/mbedtls/source/library/sha1.c rename to components/ssl/mbedtls/source/library/sha1.c index c9acc64e..6f2d0d34 100644 --- a/components/mbedtls/source/library/sha1.c +++ b/components/ssl/mbedtls/source/library/sha1.c @@ -307,7 +307,7 @@ void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, memcpy( (void *) (ctx->buffer + left), input, ilen ); } -static const unsigned char sha1_padding[64] ICACHE_RODATA_ATTR = +static const unsigned char sha1_padding[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/components/mbedtls/source/library/sha256.c b/components/ssl/mbedtls/source/library/sha256.c similarity index 99% rename from components/mbedtls/source/library/sha256.c rename to components/ssl/mbedtls/source/library/sha256.c index 946e6724..24c7a758 100644 --- a/components/mbedtls/source/library/sha256.c +++ b/components/ssl/mbedtls/source/library/sha256.c @@ -132,7 +132,7 @@ void mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 ) } #if !defined(MBEDTLS_SHA256_PROCESS_ALT) -static const uint32_t K[] ICACHE_RODATA_ATTR STORE_ATTR = +static const uint32_t K[] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, @@ -274,7 +274,7 @@ void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *in memcpy( (void *) (ctx->buffer + left), input, ilen ); } -static const unsigned char sha256_padding[64] ICACHE_RODATA_ATTR = +static const unsigned char sha256_padding[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/components/mbedtls/source/library/sha512.c b/components/ssl/mbedtls/source/library/sha512.c similarity index 99% rename from components/mbedtls/source/library/sha512.c rename to components/ssl/mbedtls/source/library/sha512.c index 1ee22a66..dbc2a39c 100644 --- a/components/mbedtls/source/library/sha512.c +++ b/components/ssl/mbedtls/source/library/sha512.c @@ -93,7 +93,7 @@ static void mbedtls_zeroize( void *v, size_t n ) { /* * Round constants */ -static const uint64_t K[80] ICACHE_RODATA_ATTR STORE_ATTR = +static const uint64_t K[80] = { UL64(0x428A2F98D728AE22), UL64(0x7137449123EF65CD), UL64(0xB5C0FBCFEC4D3B2F), UL64(0xE9B5DBA58189DBBC), @@ -303,7 +303,7 @@ void mbedtls_sha512_update( mbedtls_sha512_context *ctx, const unsigned char *in memcpy( (void *) (ctx->buffer + left), input, ilen ); } -static const unsigned char sha512_padding[128] ICACHE_RODATA_ATTR STORE_ATTR = +static const unsigned char sha512_padding[128] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/components/mbedtls/source/library/ssl_cache.c b/components/ssl/mbedtls/source/library/ssl_cache.c similarity index 100% rename from components/mbedtls/source/library/ssl_cache.c rename to components/ssl/mbedtls/source/library/ssl_cache.c diff --git a/components/mbedtls/source/library/ssl_ciphersuites.c b/components/ssl/mbedtls/source/library/ssl_ciphersuites.c similarity index 99% rename from components/mbedtls/source/library/ssl_ciphersuites.c rename to components/ssl/mbedtls/source/library/ssl_ciphersuites.c index 862deb38..d66af815 100644 --- a/components/mbedtls/source/library/ssl_ciphersuites.c +++ b/components/ssl/mbedtls/source/library/ssl_ciphersuites.c @@ -48,7 +48,7 @@ * 4. By hash function used when relevant * 5. By key exchange/auth again: EC > non-EC */ -static const int ciphersuite_preference[] ICACHE_RODATA_ATTR STORE_ATTR = +static const int ciphersuite_preference[] = { #if defined(MBEDTLS_SSL_CIPHERSUITES) MBEDTLS_SSL_CIPHERSUITES, @@ -260,7 +260,7 @@ static const int ciphersuite_preference[] ICACHE_RODATA_ATTR STORE_ATTR = 0 }; -static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] ICACHE_RODATA_ATTR STORE_ATTR = +static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] = { #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) #if defined(MBEDTLS_AES_C) diff --git a/components/mbedtls/source/library/ssl_cli.c b/components/ssl/mbedtls/source/library/ssl_cli.c similarity index 100% rename from components/mbedtls/source/library/ssl_cli.c rename to components/ssl/mbedtls/source/library/ssl_cli.c diff --git a/components/mbedtls/source/library/ssl_cookie.c b/components/ssl/mbedtls/source/library/ssl_cookie.c similarity index 100% rename from components/mbedtls/source/library/ssl_cookie.c rename to components/ssl/mbedtls/source/library/ssl_cookie.c diff --git a/components/mbedtls/source/library/ssl_srv.c b/components/ssl/mbedtls/source/library/ssl_srv.c similarity index 100% rename from components/mbedtls/source/library/ssl_srv.c rename to components/ssl/mbedtls/source/library/ssl_srv.c diff --git a/components/mbedtls/source/library/ssl_ticket.c b/components/ssl/mbedtls/source/library/ssl_ticket.c similarity index 100% rename from components/mbedtls/source/library/ssl_ticket.c rename to components/ssl/mbedtls/source/library/ssl_ticket.c diff --git a/components/mbedtls/source/library/ssl_tls.c b/components/ssl/mbedtls/source/library/ssl_tls.c similarity index 100% rename from components/mbedtls/source/library/ssl_tls.c rename to components/ssl/mbedtls/source/library/ssl_tls.c diff --git a/components/mbedtls/source/library/threading.c b/components/ssl/mbedtls/source/library/threading.c similarity index 100% rename from components/mbedtls/source/library/threading.c rename to components/ssl/mbedtls/source/library/threading.c diff --git a/components/mbedtls/source/library/timing.c b/components/ssl/mbedtls/source/library/timing.c similarity index 100% rename from components/mbedtls/source/library/timing.c rename to components/ssl/mbedtls/source/library/timing.c diff --git a/components/mbedtls/source/library/version.c b/components/ssl/mbedtls/source/library/version.c similarity index 100% rename from components/mbedtls/source/library/version.c rename to components/ssl/mbedtls/source/library/version.c diff --git a/components/mbedtls/source/library/version_features.c b/components/ssl/mbedtls/source/library/version_features.c similarity index 100% rename from components/mbedtls/source/library/version_features.c rename to components/ssl/mbedtls/source/library/version_features.c diff --git a/components/mbedtls/source/library/x509.c b/components/ssl/mbedtls/source/library/x509.c similarity index 100% rename from components/mbedtls/source/library/x509.c rename to components/ssl/mbedtls/source/library/x509.c diff --git a/components/mbedtls/source/library/x509_create.c b/components/ssl/mbedtls/source/library/x509_create.c similarity index 99% rename from components/mbedtls/source/library/x509_create.c rename to components/ssl/mbedtls/source/library/x509_create.c index 823747bc..a3e1a8d9 100644 --- a/components/mbedtls/source/library/x509_create.c +++ b/components/ssl/mbedtls/source/library/x509_create.c @@ -41,7 +41,7 @@ typedef struct { #define ADD_STRLEN( s ) s, sizeof( s ) - 1 -static const x509_attr_descriptor_t x509_attrs[] ICACHE_RODATA_ATTR STORE_ATTR = +static const x509_attr_descriptor_t x509_attrs[] = { { ADD_STRLEN( "CN" ), MBEDTLS_OID_AT_CN }, { ADD_STRLEN( "commonName" ), MBEDTLS_OID_AT_CN }, diff --git a/components/mbedtls/source/library/x509_crl.c b/components/ssl/mbedtls/source/library/x509_crl.c similarity index 100% rename from components/mbedtls/source/library/x509_crl.c rename to components/ssl/mbedtls/source/library/x509_crl.c diff --git a/components/mbedtls/source/library/x509_crt.c b/components/ssl/mbedtls/source/library/x509_crt.c similarity index 99% rename from components/mbedtls/source/library/x509_crt.c rename to components/ssl/mbedtls/source/library/x509_crt.c index d9a5bce2..0074cbaa 100644 --- a/components/mbedtls/source/library/x509_crt.c +++ b/components/ssl/mbedtls/source/library/x509_crt.c @@ -83,7 +83,7 @@ static void mbedtls_zeroize( void *v, size_t n ) { /* * Default profile */ -const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_default ICACHE_RODATA_ATTR = +const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_default = { /* Hashes from SHA-1 and above */ MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA1 ) | @@ -100,7 +100,7 @@ const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_default ICACHE_RODATA_AT /* * Next-default profile */ -const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_next ICACHE_RODATA_ATTR = +const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_next = { /* Hashes from SHA-256 and above */ MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA256 ) | @@ -125,7 +125,7 @@ const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_next ICACHE_RODATA_ATTR /* * NSA Suite B Profile */ -const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_suiteb ICACHE_RODATA_ATTR = +const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_suiteb = { /* Only SHA-256 and 384 */ MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA256 ) | diff --git a/components/mbedtls/source/library/x509_csr.c b/components/ssl/mbedtls/source/library/x509_csr.c similarity index 100% rename from components/mbedtls/source/library/x509_csr.c rename to components/ssl/mbedtls/source/library/x509_csr.c diff --git a/components/mbedtls/source/library/x509write_crt.c b/components/ssl/mbedtls/source/library/x509write_crt.c similarity index 100% rename from components/mbedtls/source/library/x509write_crt.c rename to components/ssl/mbedtls/source/library/x509write_crt.c diff --git a/components/mbedtls/source/library/x509write_csr.c b/components/ssl/mbedtls/source/library/x509write_csr.c similarity index 100% rename from components/mbedtls/source/library/x509write_csr.c rename to components/ssl/mbedtls/source/library/x509write_csr.c diff --git a/components/mbedtls/source/library/xtea.c b/components/ssl/mbedtls/source/library/xtea.c similarity index 100% rename from components/mbedtls/source/library/xtea.c rename to components/ssl/mbedtls/source/library/xtea.c diff --git a/components/mbedtls/source/platform/esp_hardware.c b/components/ssl/mbedtls/source/platform/esp_hardware.c similarity index 100% rename from components/mbedtls/source/platform/esp_hardware.c rename to components/ssl/mbedtls/source/platform/esp_hardware.c diff --git a/components/mbedtls/source/platform/net.c b/components/ssl/mbedtls/source/platform/net.c similarity index 100% rename from components/mbedtls/source/platform/net.c rename to components/ssl/mbedtls/source/platform/net.c diff --git a/components/openssl/OpenSSL-APIs.rst b/components/ssl/openssl/OpenSSL-APIs.rst similarity index 100% rename from components/openssl/OpenSSL-APIs.rst rename to components/ssl/openssl/OpenSSL-APIs.rst diff --git a/components/openssl/include/internal/ssl3.h b/components/ssl/openssl/include/internal/ssl3.h similarity index 100% rename from components/openssl/include/internal/ssl3.h rename to components/ssl/openssl/include/internal/ssl3.h diff --git a/components/openssl/include/internal/ssl_cert.h b/components/ssl/openssl/include/internal/ssl_cert.h similarity index 100% rename from components/openssl/include/internal/ssl_cert.h rename to components/ssl/openssl/include/internal/ssl_cert.h diff --git a/components/openssl/include/internal/ssl_code.h b/components/ssl/openssl/include/internal/ssl_code.h similarity index 100% rename from components/openssl/include/internal/ssl_code.h rename to components/ssl/openssl/include/internal/ssl_code.h diff --git a/components/openssl/include/internal/ssl_dbg.h b/components/ssl/openssl/include/internal/ssl_dbg.h similarity index 100% rename from components/openssl/include/internal/ssl_dbg.h rename to components/ssl/openssl/include/internal/ssl_dbg.h diff --git a/components/openssl/include/internal/ssl_lib.h b/components/ssl/openssl/include/internal/ssl_lib.h similarity index 100% rename from components/openssl/include/internal/ssl_lib.h rename to components/ssl/openssl/include/internal/ssl_lib.h diff --git a/components/openssl/include/internal/ssl_methods.h b/components/ssl/openssl/include/internal/ssl_methods.h similarity index 100% rename from components/openssl/include/internal/ssl_methods.h rename to components/ssl/openssl/include/internal/ssl_methods.h diff --git a/components/openssl/include/internal/ssl_pkey.h b/components/ssl/openssl/include/internal/ssl_pkey.h similarity index 100% rename from components/openssl/include/internal/ssl_pkey.h rename to components/ssl/openssl/include/internal/ssl_pkey.h diff --git a/components/openssl/include/internal/ssl_stack.h b/components/ssl/openssl/include/internal/ssl_stack.h similarity index 100% rename from components/openssl/include/internal/ssl_stack.h rename to components/ssl/openssl/include/internal/ssl_stack.h diff --git a/components/openssl/include/internal/ssl_types.h b/components/ssl/openssl/include/internal/ssl_types.h similarity index 100% rename from components/openssl/include/internal/ssl_types.h rename to components/ssl/openssl/include/internal/ssl_types.h diff --git a/components/openssl/include/internal/ssl_x509.h b/components/ssl/openssl/include/internal/ssl_x509.h similarity index 100% rename from components/openssl/include/internal/ssl_x509.h rename to components/ssl/openssl/include/internal/ssl_x509.h diff --git a/components/openssl/include/internal/tls1.h b/components/ssl/openssl/include/internal/tls1.h similarity index 100% rename from components/openssl/include/internal/tls1.h rename to components/ssl/openssl/include/internal/tls1.h diff --git a/components/openssl/include/internal/x509_vfy.h b/components/ssl/openssl/include/internal/x509_vfy.h similarity index 100% rename from components/openssl/include/internal/x509_vfy.h rename to components/ssl/openssl/include/internal/x509_vfy.h diff --git a/components/openssl/include/openssl/ssl.h b/components/ssl/openssl/include/openssl/ssl.h similarity index 100% rename from components/openssl/include/openssl/ssl.h rename to components/ssl/openssl/include/openssl/ssl.h diff --git a/components/openssl/include/platform/ssl_opt.h b/components/ssl/openssl/include/platform/ssl_opt.h similarity index 100% rename from components/openssl/include/platform/ssl_opt.h rename to components/ssl/openssl/include/platform/ssl_opt.h diff --git a/components/openssl/include/platform/ssl_pm.h b/components/ssl/openssl/include/platform/ssl_pm.h similarity index 100% rename from components/openssl/include/platform/ssl_pm.h rename to components/ssl/openssl/include/platform/ssl_pm.h diff --git a/components/openssl/include/platform/ssl_port.h b/components/ssl/openssl/include/platform/ssl_port.h similarity index 81% rename from components/openssl/include/platform/ssl_port.h rename to components/ssl/openssl/include/platform/ssl_port.h index 133fc968..4403c420 100644 --- a/components/openssl/include/platform/ssl_port.h +++ b/components/ssl/openssl/include/platform/ssl_port.h @@ -31,20 +31,17 @@ extern void vPortFree(void *pv, const char * file, unsigned line); #define ssl_mem_malloc(s) \ ({ \ - static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \ - pvPortMalloc(s, mem_debug_file, __LINE__, false); \ + pvPortMalloc(s, __FILE__, __LINE__, false); \ }) #define ssl_mem_zalloc(s) \ ({ \ - static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \ - pvPortZalloc(s, mem_debug_file, __LINE__); \ + pvPortZalloc(s, __FILE__, __LINE__); \ }) #define ssl_mem_free(s) \ do{\ - static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \ - vPortFree(s, mem_debug_file, __LINE__);\ + vPortFree(s, __FILE__, __LINE__);\ }while(0) diff --git a/components/openssl/source/library/ssl_cert.c b/components/ssl/openssl/source/library/ssl_cert.c similarity index 100% rename from components/openssl/source/library/ssl_cert.c rename to components/ssl/openssl/source/library/ssl_cert.c diff --git a/components/openssl/source/library/ssl_lib.c b/components/ssl/openssl/source/library/ssl_lib.c similarity index 100% rename from components/openssl/source/library/ssl_lib.c rename to components/ssl/openssl/source/library/ssl_lib.c diff --git a/components/openssl/source/library/ssl_methods.c b/components/ssl/openssl/source/library/ssl_methods.c similarity index 100% rename from components/openssl/source/library/ssl_methods.c rename to components/ssl/openssl/source/library/ssl_methods.c diff --git a/components/openssl/source/library/ssl_pkey.c b/components/ssl/openssl/source/library/ssl_pkey.c similarity index 100% rename from components/openssl/source/library/ssl_pkey.c rename to components/ssl/openssl/source/library/ssl_pkey.c diff --git a/components/openssl/source/library/ssl_stack.c b/components/ssl/openssl/source/library/ssl_stack.c similarity index 100% rename from components/openssl/source/library/ssl_stack.c rename to components/ssl/openssl/source/library/ssl_stack.c diff --git a/components/openssl/source/library/ssl_x509.c b/components/ssl/openssl/source/library/ssl_x509.c similarity index 100% rename from components/openssl/source/library/ssl_x509.c rename to components/ssl/openssl/source/library/ssl_x509.c diff --git a/components/openssl/source/platform/ssl_pm.c b/components/ssl/openssl/source/platform/ssl_pm.c similarity index 100% rename from components/openssl/source/platform/ssl_pm.c rename to components/ssl/openssl/source/platform/ssl_pm.c diff --git a/components/openssl/source/platform/ssl_pm_extend.c b/components/ssl/openssl/source/platform/ssl_pm_extend.c similarity index 100% rename from components/openssl/source/platform/ssl_pm_extend.c rename to components/ssl/openssl/source/platform/ssl_pm_extend.c