From: kang Date: Fri, 1 Sep 2017 06:44:07 +0000 (+0900) Subject: move tls from /os/net to /external X-Git-Tag: 1.1_Public_Release~297^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8908423150e8181eb8a8d767a52ca98ac04527dc;p=rtos%2Ftinyara.git move tls from /os/net to /external --- diff --git a/apps/examples/dtls_client/dtls_client_main.c b/apps/examples/dtls_client/dtls_client_main.c index 617341d..f549dd5 100644 --- a/apps/examples/dtls_client/dtls_client_main.c +++ b/apps/examples/dtls_client/dtls_client_main.c @@ -43,7 +43,7 @@ #include #include -#include "tls/config.h" +#include "mbedtls/config.h" #if !defined(MBEDTLS_SSL_CLI_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) || \ !defined(MBEDTLS_NET_C) || !defined(MBEDTLS_TIMING_C) || \ @@ -64,14 +64,14 @@ int dtls_client_main(int argc, char **argv) #define mbedtls_printf printf #define mbedtls_fprintf fprintf -#include "tls/net.h" -#include "tls/debug.h" -#include "tls/ssl.h" -#include "tls/entropy.h" -#include "tls/ctr_drbg.h" -#include "tls/error.h" -#include "tls/certs.h" -#include "tls/timing.h" +#include "mbedtls/net.h" +#include "mbedtls/debug.h" +#include "mbedtls/ssl.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/error.h" +#include "mbedtls/certs.h" +#include "mbedtls/timing.h" #define SERVER_PORT "4433" #define SERVER_NAME "localhost" diff --git a/apps/examples/dtls_server/dtls_server_main.c b/apps/examples/dtls_server/dtls_server_main.c index 8c63298..4ed337b 100644 --- a/apps/examples/dtls_server/dtls_server_main.c +++ b/apps/examples/dtls_server/dtls_server_main.c @@ -44,7 +44,7 @@ #include #include -#include "tls/config.h" +#include "mbedtls/config.h" #if !defined(MBEDTLS_SSL_SRV_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) || \ !defined(MBEDTLS_SSL_COOKIE_C) || !defined(MBEDTLS_NET_C) || \ @@ -67,19 +67,19 @@ int dtls_server_main(int argc, char **argv) #define mbedtls_printf printf #define mbedtls_fprintf fprintf -#include "tls/entropy.h" -#include "tls/ctr_drbg.h" -#include "tls/certs.h" -#include "tls/x509.h" -#include "tls/ssl.h" -#include "tls/ssl_cookie.h" -#include "tls/net.h" -#include "tls/error.h" -#include "tls/debug.h" -#include "tls/timing.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/ssl.h" +#include "mbedtls/ssl_cookie.h" +#include "mbedtls/net.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/timing.h" #if defined(MBEDTLS_SSL_CACHE_C) -#include "tls/ssl_cache.h" +#include "mbedtls/ssl_cache.h" #endif #define READ_TIMEOUT_MS 10000 /* 5 seconds */ diff --git a/apps/examples/easysetup/easysetup_main.c b/apps/examples/easysetup/easysetup_main.c index 0247a28..6e8b128 100644 --- a/apps/examples/easysetup/easysetup_main.c +++ b/apps/examples/easysetup/easysetup_main.c @@ -59,8 +59,8 @@ static const char g_httpcnlost[] = "close"; static struct timeval rt; #ifdef CONFIG_HW_RSA -#include "tls/sss_key.h" -#include "tls/see_api.h" +#include "mbedtls/sss_key.h" +#include "mbedtls/see_api.h" #define EASY_CA_KEY_INDEX 1 #define EASY_DEV_KEY_INDEX 2 diff --git a/apps/examples/lwm2m_test/connection.h b/apps/examples/lwm2m_test/connection.h index 3471ddd..d036aa5 100644 --- a/apps/examples/lwm2m_test/connection.h +++ b/apps/examples/lwm2m_test/connection.h @@ -28,7 +28,7 @@ #include "../../../external/wakaama/core/liblwm2m.h" #ifdef WITH_MBEDTLS -#include +#include "mbedtls/easy_tls.h" #endif #define LWM2M_STANDARD_PORT_STR "5683" diff --git a/apps/examples/lwm2m_test/lwm2m_client_main.h b/apps/examples/lwm2m_test/lwm2m_client_main.h index 4625a3f..b2f9866 100644 --- a/apps/examples/lwm2m_test/lwm2m_client_main.h +++ b/apps/examples/lwm2m_test/lwm2m_client_main.h @@ -81,8 +81,8 @@ #include "connection.h" #ifdef WITH_MBEDTLS -#include "tls/certs.h" -#include "tls/easy_tls.h" +#include "mbedtls/certs.h" +#include "mbedtls/easy_tls.h" #define LWM2M_CIPHERSUIT "TLS-PSK-WITH-AES-128-CBC-SHA" #endif diff --git a/apps/examples/lwm2m_test/lwm2m_server_main.h b/apps/examples/lwm2m_test/lwm2m_server_main.h index e359b20..c33f037 100644 --- a/apps/examples/lwm2m_test/lwm2m_server_main.h +++ b/apps/examples/lwm2m_test/lwm2m_server_main.h @@ -80,8 +80,8 @@ #include #ifdef WITH_MBEDTLS -#include "tls/certs.h" -#include "tls/easy_tls.h" +#include "mbedtls/certs.h" +#include "mbedtls/easy_tls.h" #endif #define MAX_PACKET_SIZE 1024 diff --git a/apps/examples/mqtt_test/mqtt_client_pub.c b/apps/examples/mqtt_test/mqtt_client_pub.c index e760b77..3371dcb 100644 --- a/apps/examples/mqtt_test/mqtt_client_pub.c +++ b/apps/examples/mqtt_test/mqtt_client_pub.c @@ -37,8 +37,8 @@ #include #if defined(CONFIG_NETUTILS_MQTT_SECURITY) -#include "tls/x509_crt.h" -#include "tls/pem.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/pem.h" #endif /**************************************************************************** diff --git a/apps/examples/mqtt_test/mqtt_client_sub.c b/apps/examples/mqtt_test/mqtt_client_sub.c index 1927595..21912b0 100644 --- a/apps/examples/mqtt_test/mqtt_client_sub.c +++ b/apps/examples/mqtt_test/mqtt_client_sub.c @@ -35,8 +35,8 @@ #include #if defined(CONFIG_NETUTILS_MQTT_SECURITY) -#include "tls/x509_crt.h" -#include "tls/pem.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/pem.h" #endif /**************************************************************************** diff --git a/apps/examples/tls_benchmark/tls_benchmark_main.c b/apps/examples/tls_benchmark/tls_benchmark_main.c index 284a278..13fa62f 100644 --- a/apps/examples/tls_benchmark/tls_benchmark_main.c +++ b/apps/examples/tls_benchmark/tls_benchmark_main.c @@ -42,30 +42,30 @@ #include #include -#include "tls/timing.h" - -#include "tls/md4.h" -#include "tls/md5.h" -#include "tls/ripemd160.h" -#include "tls/sha1.h" -#include "tls/sha256.h" -#include "tls/sha512.h" -#include "tls/arc4.h" -#include "tls/des.h" -#include "tls/aes.h" -#include "tls/blowfish.h" -#include "tls/camellia.h" -#include "tls/gcm.h" -#include "tls/ccm.h" -#include "tls/cmac.h" -#include "tls/havege.h" -#include "tls/ctr_drbg.h" -#include "tls/hmac_drbg.h" -#include "tls/rsa.h" -#include "tls/dhm.h" -#include "tls/ecdsa.h" -#include "tls/ecdh.h" -#include "tls/error.h" +#include "mbedtls/timing.h" + +#include "mbedtls/md4.h" +#include "mbedtls/md5.h" +#include "mbedtls/ripemd160.h" +#include "mbedtls/sha1.h" +#include "mbedtls/sha256.h" +#include "mbedtls/sha512.h" +#include "mbedtls/arc4.h" +#include "mbedtls/des.h" +#include "mbedtls/aes.h" +#include "mbedtls/blowfish.h" +#include "mbedtls/camellia.h" +#include "mbedtls/gcm.h" +#include "mbedtls/ccm.h" +#include "mbedtls/cmac.h" +#include "mbedtls/havege.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/hmac_drbg.h" +#include "mbedtls/rsa.h" +#include "mbedtls/dhm.h" +#include "mbedtls/ecdsa.h" +#include "mbedtls/ecdh.h" +#include "mbedtls/error.h" #define mbedtls_exit exit #define mbedtls_snprintf snprintf diff --git a/apps/examples/tls_client/tls_client_main.c b/apps/examples/tls_client/tls_client_main.c index 58f7920..ee66084 100644 --- a/apps/examples/tls_client/tls_client_main.c +++ b/apps/examples/tls_client/tls_client_main.c @@ -60,7 +60,7 @@ #include #include -#include "tls/config.h" +#include "mbedtls/config.h" #if !defined(MBEDTLS_ENTROPY_C) || \ !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_CLI_C) || \ @@ -78,18 +78,18 @@ int tls_client_main(int argc, char **argv) #define mbedtls_fprintf fprintf #define mbedtls_snprintf snprintf -#include "tls/net.h" -#include "tls/ssl.h" -#include "tls/entropy.h" -#include "tls/ctr_drbg.h" -#include "tls/certs.h" -#include "tls/x509.h" -#include "tls/error.h" -#include "tls/debug.h" -#include "tls/timing.h" +#include "mbedtls/net.h" +#include "mbedtls/ssl.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/timing.h" #ifdef CONFIG_EXAMPLES_TLS_ARTIK_KEY -#include "tls/see_api.h" +#include "mbedtls/see_api.h" #endif /* diff --git a/apps/examples/tls_selftest/tls_selftest_main.c b/apps/examples/tls_selftest/tls_selftest_main.c index 16d3dc3..789133a 100644 --- a/apps/examples/tls_selftest/tls_selftest_main.c +++ b/apps/examples/tls_selftest/tls_selftest_main.c @@ -41,32 +41,32 @@ #include #include -#include "tls/config.h" -#include "tls/entropy.h" -#include "tls/hmac_drbg.h" -#include "tls/ctr_drbg.h" -#include "tls/dhm.h" -#include "tls/gcm.h" -#include "tls/ccm.h" -#include "tls/md2.h" -#include "tls/md4.h" -#include "tls/md5.h" -#include "tls/ripemd160.h" -#include "tls/sha1.h" -#include "tls/sha256.h" -#include "tls/sha512.h" -#include "tls/arc4.h" -#include "tls/des.h" -#include "tls/aes.h" -#include "tls/camellia.h" -#include "tls/base64.h" -#include "tls/bignum.h" -#include "tls/rsa.h" -#include "tls/x509.h" -#include "tls/xtea.h" -#include "tls/pkcs5.h" -#include "tls/ecp.h" -#include "tls/timing.h" +#include "mbedtls/config.h" +#include "mbedtls/entropy.h" +#include "mbedtls/hmac_drbg.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/dhm.h" +#include "mbedtls/gcm.h" +#include "mbedtls/ccm.h" +#include "mbedtls/md2.h" +#include "mbedtls/md4.h" +#include "mbedtls/md5.h" +#include "mbedtls/ripemd160.h" +#include "mbedtls/sha1.h" +#include "mbedtls/sha256.h" +#include "mbedtls/sha512.h" +#include "mbedtls/arc4.h" +#include "mbedtls/des.h" +#include "mbedtls/aes.h" +#include "mbedtls/camellia.h" +#include "mbedtls/base64.h" +#include "mbedtls/bignum.h" +#include "mbedtls/rsa.h" +#include "mbedtls/x509.h" +#include "mbedtls/xtea.h" +#include "mbedtls/pkcs5.h" +#include "mbedtls/ecp.h" +#include "mbedtls/timing.h" #define mbedtls_printf printf /* diff --git a/apps/examples/tls_server/tls_server_main.c b/apps/examples/tls_server/tls_server_main.c index d382d45..53279c6 100644 --- a/apps/examples/tls_server/tls_server_main.c +++ b/apps/examples/tls_server/tls_server_main.c @@ -46,7 +46,7 @@ #include #include -#include "tls/config.h" +#include "mbedtls/config.h" #if !defined(MBEDTLS_ENTROPY_C) || \ !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_SRV_C) || \ @@ -65,30 +65,30 @@ int tls_server_main(int argc, char **argv) #define mbedtls_fprintf fprintf #define mbedtls_printf printf -#include "tls/net.h" -#include "tls/ssl.h" -#include "tls/entropy.h" -#include "tls/ctr_drbg.h" -#include "tls/certs.h" -#include "tls/x509.h" -#include "tls/error.h" -#include "tls/debug.h" -#include "tls/timing.h" +#include "mbedtls/net.h" +#include "mbedtls/ssl.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/timing.h" #if defined(MBEDTLS_SSL_CACHE_C) -#include "tls/ssl_cache.h" +#include "mbedtls/ssl_cache.h" #endif #if defined(MBEDTLS_SSL_TICKET_C) -#include "tls/ssl_ticket.h" +#include "mbedtls/ssl_ticket.h" #endif #if defined(MBEDTLS_SSL_COOKIE_C) -#include "tls/ssl_cookie.h" +#include "mbedtls/ssl_cookie.h" #endif #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "tls/memory_buffer_alloc.h" +#include "mbedtls/memory_buffer_alloc.h" #endif #if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) && defined(MBEDTLS_FS_IO) diff --git a/apps/examples/websocket/websocket_main.c b/apps/examples/websocket/websocket_main.c index 494ab49..24fb8ec 100644 --- a/apps/examples/websocket/websocket_main.c +++ b/apps/examples/websocket/websocket_main.c @@ -119,16 +119,16 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "mbedtls/config.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/ssl.h" +#include "mbedtls/net.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/ssl_cache.h" #include diff --git a/apps/wpa_supplicant/src/crypto/crypto_internal-modexp.c b/apps/wpa_supplicant/src/crypto/crypto_internal-modexp.c index 82f9dfb..8aafcf5 100644 --- a/apps/wpa_supplicant/src/crypto/crypto_internal-modexp.c +++ b/apps/wpa_supplicant/src/crypto/crypto_internal-modexp.c @@ -9,7 +9,7 @@ #include "includes.h" #include "common.h" -#include "tls/bignum.h" +#include "mbedtls/bignum.h" #include "crypto.h" int crypto_mod_exp(const u8 *base, size_t base_len, const u8 *power, size_t power_len, const u8 *modulus, size_t modulus_len, u8 *result, size_t *result_len) diff --git a/apps/wpa_supplicant/src/crypto/crypto_internal-rsa.c b/apps/wpa_supplicant/src/crypto/crypto_internal-rsa.c index 3417e94..00763b0 100644 --- a/apps/wpa_supplicant/src/crypto/crypto_internal-rsa.c +++ b/apps/wpa_supplicant/src/crypto/crypto_internal-rsa.c @@ -10,9 +10,9 @@ #include "common.h" #include "crypto.h" -#include "tls/rsa.h" -#include "tls/pkcs1.h" -#include "tls/pkcs8.h" +#include "mbedtls/rsa.h" +#include "mbedtls/pkcs1.h" +#include "mbedtls/pkcs8.h" /* Dummy structures; these are just typecast to struct crypto_rsa_key */ struct crypto_public_key; diff --git a/apps/wpa_supplicant/src/crypto/tls_internal.c b/apps/wpa_supplicant/src/crypto/tls_internal.c index d3a18ff..229fdd4 100644 --- a/apps/wpa_supplicant/src/crypto/tls_internal.c +++ b/apps/wpa_supplicant/src/crypto/tls_internal.c @@ -13,8 +13,8 @@ #include "common.h" #include "tls.h" -#include "tls/tlsv1_client.h" -#include "tls/tlsv1_server.h" +#include "mbedtls/tlsv1_client.h" +#include "mbedtls/tlsv1_server.h" static int tls_ref_count = 0; diff --git a/external/Makefile b/external/Makefile index b131523..8414de3 100644 --- a/external/Makefile +++ b/external/Makefile @@ -95,7 +95,7 @@ include telnetd/Make.defs include smtp/Make.defs include netlib/Make.defs include json/Make.defs - +include mbedtls/Make.defs AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/external/aws/platform/TizenRT/mbedtls/network_platform.h b/external/aws/platform/TizenRT/mbedtls/network_platform.h index b6f7e4c..c2810a1 100644 --- a/external/aws/platform/TizenRT/mbedtls/network_platform.h +++ b/external/aws/platform/TizenRT/mbedtls/network_platform.h @@ -15,18 +15,18 @@ #ifndef IOTSDKC_NETWORK_MBEDTLS_PLATFORM_H_H -#include "tls/config.h" - -#include "tls/platform.h" -#include "tls/net.h" -#include "tls/ssl.h" -#include "tls/entropy.h" -#include "tls/ctr_drbg.h" -#include "tls/certs.h" -#include "tls/x509.h" -#include "tls/error.h" -#include "tls/debug.h" -#include "tls/timing.h" +#include "mbedtls/config.h" + +#include "mbedtls/platform.h" +#include "mbedtls/net.h" +#include "mbedtls/ssl.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/timing.h" #ifdef __cplusplus extern "C" { diff --git a/os/net/tls/LICENSE b/external/include/mbedtls/LICENSE similarity index 100% rename from os/net/tls/LICENSE rename to external/include/mbedtls/LICENSE diff --git a/os/include/tls/aes.h b/external/include/mbedtls/aes.h similarity index 100% rename from os/include/tls/aes.h rename to external/include/mbedtls/aes.h diff --git a/os/include/tls/aesni.h b/external/include/mbedtls/aesni.h similarity index 100% rename from os/include/tls/aesni.h rename to external/include/mbedtls/aesni.h diff --git a/os/net/tls/apache-2.0.txt b/external/include/mbedtls/apache-2.0.txt similarity index 100% rename from os/net/tls/apache-2.0.txt rename to external/include/mbedtls/apache-2.0.txt diff --git a/os/include/tls/arc4.h b/external/include/mbedtls/arc4.h similarity index 100% rename from os/include/tls/arc4.h rename to external/include/mbedtls/arc4.h diff --git a/os/include/tls/asn1.h b/external/include/mbedtls/asn1.h similarity index 100% rename from os/include/tls/asn1.h rename to external/include/mbedtls/asn1.h diff --git a/os/include/tls/asn1write.h b/external/include/mbedtls/asn1write.h similarity index 100% rename from os/include/tls/asn1write.h rename to external/include/mbedtls/asn1write.h diff --git a/os/include/tls/base64.h b/external/include/mbedtls/base64.h similarity index 100% rename from os/include/tls/base64.h rename to external/include/mbedtls/base64.h diff --git a/os/include/tls/bignum.h b/external/include/mbedtls/bignum.h similarity index 100% rename from os/include/tls/bignum.h rename to external/include/mbedtls/bignum.h diff --git a/os/include/tls/blowfish.h b/external/include/mbedtls/blowfish.h similarity index 100% rename from os/include/tls/blowfish.h rename to external/include/mbedtls/blowfish.h diff --git a/os/include/tls/bn_mul.h b/external/include/mbedtls/bn_mul.h similarity index 100% rename from os/include/tls/bn_mul.h rename to external/include/mbedtls/bn_mul.h diff --git a/os/include/tls/camellia.h b/external/include/mbedtls/camellia.h similarity index 100% rename from os/include/tls/camellia.h rename to external/include/mbedtls/camellia.h diff --git a/os/include/tls/ccm.h b/external/include/mbedtls/ccm.h similarity index 100% rename from os/include/tls/ccm.h rename to external/include/mbedtls/ccm.h diff --git a/os/include/tls/certs.h b/external/include/mbedtls/certs.h similarity index 100% rename from os/include/tls/certs.h rename to external/include/mbedtls/certs.h diff --git a/os/include/tls/check_config.h b/external/include/mbedtls/check_config.h similarity index 100% rename from os/include/tls/check_config.h rename to external/include/mbedtls/check_config.h diff --git a/os/include/tls/cipher.h b/external/include/mbedtls/cipher.h similarity index 100% rename from os/include/tls/cipher.h rename to external/include/mbedtls/cipher.h diff --git a/os/include/tls/cipher_internal.h b/external/include/mbedtls/cipher_internal.h similarity index 100% rename from os/include/tls/cipher_internal.h rename to external/include/mbedtls/cipher_internal.h diff --git a/os/include/tls/cmac.h b/external/include/mbedtls/cmac.h similarity index 99% rename from os/include/tls/cmac.h rename to external/include/mbedtls/cmac.h index 66969e2..2af7e2b 100644 --- a/os/include/tls/cmac.h +++ b/external/include/mbedtls/cmac.h @@ -41,7 +41,7 @@ #ifndef MBEDTLS_CMAC_H #define MBEDTLS_CMAC_H -#include "tls/cipher.h" +#include "mbedtls/cipher.h" #ifdef __cplusplus extern "C" { diff --git a/os/include/tls/compat-1.3.h b/external/include/mbedtls/compat-1.3.h similarity index 100% rename from os/include/tls/compat-1.3.h rename to external/include/mbedtls/compat-1.3.h diff --git a/os/include/tls/config.h b/external/include/mbedtls/config.h similarity index 100% rename from os/include/tls/config.h rename to external/include/mbedtls/config.h diff --git a/os/include/tls/configs/config-ccm-psk-tls1_2.h b/external/include/mbedtls/configs/config-ccm-psk-tls1_2.h similarity index 98% rename from os/include/tls/configs/config-ccm-psk-tls1_2.h rename to external/include/mbedtls/configs/config-ccm-psk-tls1_2.h index 276db46..9a7463a 100644 --- a/os/include/tls/configs/config-ccm-psk-tls1_2.h +++ b/external/include/mbedtls/configs/config-ccm-psk-tls1_2.h @@ -92,7 +92,7 @@ /* * Save RAM at the expense of interoperability: do this only if you control - * both ends of the connection! (See comments in "tls/ssl.h".) + * both ends of the connection! (See comments in "mbedtls/ssl.h".) * The optimal size here depends on the typical size of records. */ #define MBEDTLS_SSL_MAX_CONTENT_LEN 512 diff --git a/os/include/tls/configs/config-mini-tls1_1.h b/external/include/mbedtls/configs/config-mini-tls1_1.h similarity index 98% rename from os/include/tls/configs/config-mini-tls1_1.h rename to external/include/mbedtls/configs/config-mini-tls1_1.h index 39962a2..1e71944 100644 --- a/os/include/tls/configs/config-mini-tls1_1.h +++ b/external/include/mbedtls/configs/config-mini-tls1_1.h @@ -87,6 +87,6 @@ /* For testing with compat.sh */ #define MBEDTLS_FS_IO -#include "tls/check_config.h" +#include "mbedtls/check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/os/include/tls/configs/config-picocoin.h b/external/include/mbedtls/configs/config-picocoin.h similarity index 100% rename from os/include/tls/configs/config-picocoin.h rename to external/include/mbedtls/configs/config-picocoin.h diff --git a/os/include/tls/configs/config-suite-b.h b/external/include/mbedtls/configs/config-suite-b.h similarity index 97% rename from os/include/tls/configs/config-suite-b.h rename to external/include/mbedtls/configs/config-suite-b.h index c948ee4..92ce3d4 100644 --- a/os/include/tls/configs/config-suite-b.h +++ b/external/include/mbedtls/configs/config-suite-b.h @@ -120,12 +120,12 @@ /* * Save RAM at the expense of interoperability: do this only if you control - * both ends of the connection! (See coments in "tls/ssl.h".) + * both ends of the connection! (See coments in "mbedtls/ssl.h".) * The minimum size here depends on the certificate chain used as well as the * typical size of records. */ #define MBEDTLS_SSL_MAX_CONTENT_LEN 1024 -#include "tls/check_config.h" +#include "mbedtls/check_config.h" #endif /* MBEDTLS_CONFIG_H */ diff --git a/os/include/tls/configs/config_ori.h b/external/include/mbedtls/configs/config_ori.h similarity index 100% rename from os/include/tls/configs/config_ori.h rename to external/include/mbedtls/configs/config_ori.h diff --git a/os/include/tls/configs/ssl_client1.c b/external/include/mbedtls/configs/ssl_client1.c similarity index 100% rename from os/include/tls/configs/ssl_client1.c rename to external/include/mbedtls/configs/ssl_client1.c diff --git a/os/include/tls/configs/ssl_server.c b/external/include/mbedtls/configs/ssl_server.c similarity index 100% rename from os/include/tls/configs/ssl_server.c rename to external/include/mbedtls/configs/ssl_server.c diff --git a/os/include/tls/ctr_drbg.h b/external/include/mbedtls/ctr_drbg.h similarity index 99% rename from os/include/tls/ctr_drbg.h rename to external/include/mbedtls/ctr_drbg.h index b4e2aa7..9c1b833 100644 --- a/os/include/tls/ctr_drbg.h +++ b/external/include/mbedtls/ctr_drbg.h @@ -43,7 +43,7 @@ #include "aes.h" #if defined(MBEDTLS_THREADING_C) -#include "tls/threading.h" +#include "mbedtls/threading.h" #endif #define MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED -0x0034 /**< The entropy source failed. */ diff --git a/os/include/tls/debug.h b/external/include/mbedtls/debug.h similarity index 100% rename from os/include/tls/debug.h rename to external/include/mbedtls/debug.h diff --git a/os/include/tls/des.h b/external/include/mbedtls/des.h similarity index 100% rename from os/include/tls/des.h rename to external/include/mbedtls/des.h diff --git a/os/include/tls/dhm.h b/external/include/mbedtls/dhm.h similarity index 100% rename from os/include/tls/dhm.h rename to external/include/mbedtls/dhm.h diff --git a/os/include/tls/easy_tls.h b/external/include/mbedtls/easy_tls.h similarity index 95% rename from os/include/tls/easy_tls.h rename to external/include/mbedtls/easy_tls.h index 9f7d553..0f9115f 100644 --- a/os/include/tls/easy_tls.h +++ b/external/include/mbedtls/easy_tls.h @@ -21,17 +21,17 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include "mbedtls/config.h" +#include "mbedtls/ssl.h" +#include "mbedtls/net.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/timing.h" +#include "mbedtls/ssl_cookie.h" #ifdef MBEDTLS_SSL_CACHE_C -#include +#include "mbedtls/ssl_cache.h" #endif #define EASY_TLS_DEBUG ndbg diff --git a/os/include/tls/ecdh.h b/external/include/mbedtls/ecdh.h similarity index 100% rename from os/include/tls/ecdh.h rename to external/include/mbedtls/ecdh.h diff --git a/os/include/tls/ecdsa.h b/external/include/mbedtls/ecdsa.h similarity index 100% rename from os/include/tls/ecdsa.h rename to external/include/mbedtls/ecdsa.h diff --git a/os/include/tls/ecjpake.h b/external/include/mbedtls/ecjpake.h similarity index 100% rename from os/include/tls/ecjpake.h rename to external/include/mbedtls/ecjpake.h diff --git a/os/include/tls/ecp.h b/external/include/mbedtls/ecp.h similarity index 100% rename from os/include/tls/ecp.h rename to external/include/mbedtls/ecp.h diff --git a/os/include/tls/entropy.h b/external/include/mbedtls/entropy.h similarity index 100% rename from os/include/tls/entropy.h rename to external/include/mbedtls/entropy.h diff --git a/os/include/tls/entropy_poll.h b/external/include/mbedtls/entropy_poll.h similarity index 100% rename from os/include/tls/entropy_poll.h rename to external/include/mbedtls/entropy_poll.h diff --git a/os/include/tls/error.h b/external/include/mbedtls/error.h similarity index 100% rename from os/include/tls/error.h rename to external/include/mbedtls/error.h diff --git a/os/include/tls/error.txt b/external/include/mbedtls/error.txt similarity index 100% rename from os/include/tls/error.txt rename to external/include/mbedtls/error.txt diff --git a/os/include/tls/gcm.h b/external/include/mbedtls/gcm.h similarity index 100% rename from os/include/tls/gcm.h rename to external/include/mbedtls/gcm.h diff --git a/os/include/tls/havege.h b/external/include/mbedtls/havege.h similarity index 100% rename from os/include/tls/havege.h rename to external/include/mbedtls/havege.h diff --git a/os/include/tls/hmac_drbg.h b/external/include/mbedtls/hmac_drbg.h similarity index 99% rename from os/include/tls/hmac_drbg.h rename to external/include/mbedtls/hmac_drbg.h index 02fafe5..6070eab 100644 --- a/os/include/tls/hmac_drbg.h +++ b/external/include/mbedtls/hmac_drbg.h @@ -43,7 +43,7 @@ #include "md.h" #if defined(MBEDTLS_THREADING_C) -#include "tls/threading.h" +#include "mbedtls/threading.h" #endif /* diff --git a/os/include/tls/md.h b/external/include/mbedtls/md.h similarity index 100% rename from os/include/tls/md.h rename to external/include/mbedtls/md.h diff --git a/os/include/tls/md2.h b/external/include/mbedtls/md2.h similarity index 100% rename from os/include/tls/md2.h rename to external/include/mbedtls/md2.h diff --git a/os/include/tls/md4.h b/external/include/mbedtls/md4.h similarity index 100% rename from os/include/tls/md4.h rename to external/include/mbedtls/md4.h diff --git a/os/include/tls/md5.h b/external/include/mbedtls/md5.h similarity index 100% rename from os/include/tls/md5.h rename to external/include/mbedtls/md5.h diff --git a/os/include/tls/md_internal.h b/external/include/mbedtls/md_internal.h similarity index 100% rename from os/include/tls/md_internal.h rename to external/include/mbedtls/md_internal.h diff --git a/os/include/tls/memory_buffer_alloc.h b/external/include/mbedtls/memory_buffer_alloc.h similarity index 100% rename from os/include/tls/memory_buffer_alloc.h rename to external/include/mbedtls/memory_buffer_alloc.h diff --git a/os/include/tls/net.h b/external/include/mbedtls/net.h similarity index 98% rename from os/include/tls/net.h rename to external/include/mbedtls/net.h index babef25..bdd6070 100644 --- a/os/include/tls/net.h +++ b/external/include/mbedtls/net.h @@ -41,7 +41,7 @@ */ #if !defined(MBEDTLS_DEPRECATED_REMOVED) -#include "tls/net_sockets.h" +#include "mbedtls/net_sockets.h" #if defined(MBEDTLS_DEPRECATED_WARNING) #warning "Deprecated header file: Superseded by tls/net_sockets.h" #endif /* MBEDTLS_DEPRECATED_WARNING */ diff --git a/os/include/tls/net_sockets.h b/external/include/mbedtls/net_sockets.h similarity index 100% rename from os/include/tls/net_sockets.h rename to external/include/mbedtls/net_sockets.h diff --git a/os/include/tls/oid.h b/external/include/mbedtls/oid.h similarity index 100% rename from os/include/tls/oid.h rename to external/include/mbedtls/oid.h diff --git a/os/include/tls/padlock.h b/external/include/mbedtls/padlock.h similarity index 100% rename from os/include/tls/padlock.h rename to external/include/mbedtls/padlock.h diff --git a/os/include/tls/pem.h b/external/include/mbedtls/pem.h similarity index 100% rename from os/include/tls/pem.h rename to external/include/mbedtls/pem.h diff --git a/os/include/tls/pk.h b/external/include/mbedtls/pk.h similarity index 100% rename from os/include/tls/pk.h rename to external/include/mbedtls/pk.h diff --git a/os/include/tls/pk_internal.h b/external/include/mbedtls/pk_internal.h similarity index 100% rename from os/include/tls/pk_internal.h rename to external/include/mbedtls/pk_internal.h diff --git a/os/include/tls/pkcs11.h b/external/include/mbedtls/pkcs11.h similarity index 100% rename from os/include/tls/pkcs11.h rename to external/include/mbedtls/pkcs11.h diff --git a/os/include/tls/pkcs12.h b/external/include/mbedtls/pkcs12.h similarity index 100% rename from os/include/tls/pkcs12.h rename to external/include/mbedtls/pkcs12.h diff --git a/os/include/tls/pkcs5.h b/external/include/mbedtls/pkcs5.h similarity index 100% rename from os/include/tls/pkcs5.h rename to external/include/mbedtls/pkcs5.h diff --git a/os/include/tls/platform.h b/external/include/mbedtls/platform.h similarity index 99% rename from os/include/tls/platform.h rename to external/include/mbedtls/platform.h index b2b7d7a..62e42fa 100644 --- a/os/include/tls/platform.h +++ b/external/include/mbedtls/platform.h @@ -47,7 +47,7 @@ #endif #if defined(MBEDTLS_HAVE_TIME) -#include "tls/platform_time.h" +#include "mbedtls/platform_time.h" #endif #ifdef __cplusplus diff --git a/os/include/tls/platform_time.h b/external/include/mbedtls/platform_time.h similarity index 100% rename from os/include/tls/platform_time.h rename to external/include/mbedtls/platform_time.h diff --git a/os/include/tls/ripemd160.h b/external/include/mbedtls/ripemd160.h similarity index 100% rename from os/include/tls/ripemd160.h rename to external/include/mbedtls/ripemd160.h diff --git a/os/include/tls/rsa.h b/external/include/mbedtls/rsa.h similarity index 100% rename from os/include/tls/rsa.h rename to external/include/mbedtls/rsa.h diff --git a/os/include/tls/see_api.h b/external/include/mbedtls/see_api.h similarity index 100% rename from os/include/tls/see_api.h rename to external/include/mbedtls/see_api.h diff --git a/os/include/tls/see_internal.h b/external/include/mbedtls/see_internal.h similarity index 99% rename from os/include/tls/see_internal.h rename to external/include/mbedtls/see_internal.h index 6277837..09f5dc1 100644 --- a/os/include/tls/see_internal.h +++ b/external/include/mbedtls/see_internal.h @@ -26,7 +26,7 @@ * Included Files ****************************************************************************/ -#include "tls/see_api.h" +#include "mbedtls/see_api.h" /**************************************************************************** * Pre-processor Definitions diff --git a/os/include/tls/sha1.h b/external/include/mbedtls/sha1.h similarity index 100% rename from os/include/tls/sha1.h rename to external/include/mbedtls/sha1.h diff --git a/os/include/tls/sha256.h b/external/include/mbedtls/sha256.h similarity index 100% rename from os/include/tls/sha256.h rename to external/include/mbedtls/sha256.h diff --git a/os/include/tls/sha512.h b/external/include/mbedtls/sha512.h similarity index 100% rename from os/include/tls/sha512.h rename to external/include/mbedtls/sha512.h diff --git a/os/include/tls/ssl.h b/external/include/mbedtls/ssl.h similarity index 99% rename from os/include/tls/ssl.h rename to external/include/mbedtls/ssl.h index 984b32c..9090419 100644 --- a/os/include/tls/ssl.h +++ b/external/include/mbedtls/ssl.h @@ -69,7 +69,7 @@ #endif #if defined(MBEDTLS_HAVE_TIME) -#include "tls/platform_time.h" +#include "mbedtls/platform_time.h" #endif /* diff --git a/os/include/tls/ssl_cache.h b/external/include/mbedtls/ssl_cache.h similarity index 100% rename from os/include/tls/ssl_cache.h rename to external/include/mbedtls/ssl_cache.h diff --git a/os/include/tls/ssl_ciphersuites.h b/external/include/mbedtls/ssl_ciphersuites.h similarity index 100% rename from os/include/tls/ssl_ciphersuites.h rename to external/include/mbedtls/ssl_ciphersuites.h diff --git a/os/include/tls/ssl_client.h b/external/include/mbedtls/ssl_client.h similarity index 100% rename from os/include/tls/ssl_client.h rename to external/include/mbedtls/ssl_client.h diff --git a/os/include/tls/ssl_cookie.h b/external/include/mbedtls/ssl_cookie.h similarity index 100% rename from os/include/tls/ssl_cookie.h rename to external/include/mbedtls/ssl_cookie.h diff --git a/os/include/tls/ssl_internal.h b/external/include/mbedtls/ssl_internal.h similarity index 100% rename from os/include/tls/ssl_internal.h rename to external/include/mbedtls/ssl_internal.h diff --git a/os/include/tls/ssl_ticket.h b/external/include/mbedtls/ssl_ticket.h similarity index 100% rename from os/include/tls/ssl_ticket.h rename to external/include/mbedtls/ssl_ticket.h diff --git a/os/include/tls/threading.h b/external/include/mbedtls/threading.h similarity index 100% rename from os/include/tls/threading.h rename to external/include/mbedtls/threading.h diff --git a/os/include/tls/timing.h b/external/include/mbedtls/timing.h similarity index 100% rename from os/include/tls/timing.h rename to external/include/mbedtls/timing.h diff --git a/os/include/tls/version.h b/external/include/mbedtls/version.h similarity index 100% rename from os/include/tls/version.h rename to external/include/mbedtls/version.h diff --git a/os/include/tls/x509.h b/external/include/mbedtls/x509.h similarity index 100% rename from os/include/tls/x509.h rename to external/include/mbedtls/x509.h diff --git a/os/include/tls/x509_crl.h b/external/include/mbedtls/x509_crl.h similarity index 100% rename from os/include/tls/x509_crl.h rename to external/include/mbedtls/x509_crl.h diff --git a/os/include/tls/x509_crt.h b/external/include/mbedtls/x509_crt.h similarity index 100% rename from os/include/tls/x509_crt.h rename to external/include/mbedtls/x509_crt.h diff --git a/os/include/tls/x509_csr.h b/external/include/mbedtls/x509_csr.h similarity index 100% rename from os/include/tls/x509_csr.h rename to external/include/mbedtls/x509_csr.h diff --git a/os/include/tls/xtea.h b/external/include/mbedtls/xtea.h similarity index 100% rename from os/include/tls/xtea.h rename to external/include/mbedtls/xtea.h diff --git a/external/include/protocols/libcoap/net.h b/external/include/protocols/libcoap/net.h index 2f7f38a..c252d89 100644 --- a/external/include/protocols/libcoap/net.h +++ b/external/include/protocols/libcoap/net.h @@ -64,8 +64,8 @@ extern "C" { #include #ifdef WITH_MBEDTLS -#include "tls/certs.h" -#include "tls/easy_tls.h" +#include "mbedtls/certs.h" +#include "mbedtls/easy_tls.h" #define COAP_CIPHERSUIT "TLS-PSK-WITH-AES-128-CBC-SHA" #endif diff --git a/external/include/protocols/webclient.h b/external/include/protocols/webclient.h index 89b50f6..cb0ce59 100755 --- a/external/include/protocols/webclient.h +++ b/external/include/protocols/webclient.h @@ -41,16 +41,16 @@ #include #ifdef CONFIG_NET_SECURITY_TLS -#include "tls/config.h" -#include "tls/entropy.h" -#include "tls/ctr_drbg.h" -#include "tls/certs.h" -#include "tls/x509.h" -#include "tls/ssl.h" -#include "tls/net.h" -#include "tls/error.h" -#include "tls/debug.h" -#include "tls/ssl_cache.h" +#include "mbedtls/config.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/ssl.h" +#include "mbedtls/net.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/ssl_cache.h" #endif #include diff --git a/external/include/protocols/webserver/http_server.h b/external/include/protocols/webserver/http_server.h index 9f8e210..76d04a1 100644 --- a/external/include/protocols/webserver/http_server.h +++ b/external/include/protocols/webserver/http_server.h @@ -51,16 +51,16 @@ #endif #ifdef CONFIG_NET_SECURITY_TLS -#include "tls/config.h" -#include "tls/entropy.h" -#include "tls/ctr_drbg.h" -#include "tls/certs.h" -#include "tls/x509.h" -#include "tls/ssl.h" -#include "tls/net.h" -#include "tls/error.h" -#include "tls/debug.h" -#include "tls/ssl_cache.h" +#include "mbedtls/config.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/ssl.h" +#include "mbedtls/net.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/ssl_cache.h" #endif /**************************************************************************** diff --git a/external/include/protocols/websocket.h b/external/include/protocols/websocket.h index fdd4ce7..9f9a784 100755 --- a/external/include/protocols/websocket.h +++ b/external/include/protocols/websocket.h @@ -42,16 +42,16 @@ #include #include -#include "tls/config.h" -#include "tls/entropy.h" -#include "tls/ctr_drbg.h" -#include "tls/certs.h" -#include "tls/x509.h" -#include "tls/ssl.h" -#include "tls/net.h" -#include "tls/error.h" -#include "tls/debug.h" -#include "tls/ssl_cache.h" +#include "mbedtls/config.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/ssl.h" +#include "mbedtls/net.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/ssl_cache.h" #define WEBSOCKET_DEBUG_PRINT /**< websocket debug print option if defined, enables debug print */ diff --git a/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript b/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript index 68aaf09..ba2c76e 100644 --- a/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript +++ b/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript @@ -78,11 +78,12 @@ if env.get('LOGGING'): dep_src_dir1 = os.path.join(tizenrt_os_dir, 'include') dep_src_dir2 = os.path.join(tizenrt_os_dir, 'include/tinyara') +dep_src_dir3 = os.path.join(tizenrt_os_dir, '../external/include') dep_lib_dir = '/usr/lib/arm-none-eabi/include' # Add directories to search for header files and external libraries -env.AppendUnique(CPPPATH = [ dep_src_dir1, dep_src_dir2 ]) +env.AppendUnique(CPPPATH = [ dep_src_dir1, dep_src_dir2, dep_src_dir3 ]) env.AppendUnique(LIBPATH = [ dep_lib_dir ]) print env.get('CPPPATH') diff --git a/external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/api/casecurityinterface.h b/external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/api/casecurityinterface.h index 6759476..0c2e190 100644 --- a/external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/api/casecurityinterface.h +++ b/external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/api/casecurityinterface.h @@ -29,7 +29,7 @@ #if defined(__WITH_DTLS__) || defined(__WITH_TLS__) #ifdef __TIZENRT__ -#include "tls/ssl.h" +#include "mbedtls/ssl.h" #else #include "mbedtls/ssl.h" #endif diff --git a/os/net/tls/Kconfig b/external/mbedtls/Kconfig.protocol similarity index 100% rename from os/net/tls/Kconfig rename to external/mbedtls/Kconfig.protocol diff --git a/os/include/tls/LICENSE b/external/mbedtls/LICENSE similarity index 100% rename from os/include/tls/LICENSE rename to external/mbedtls/LICENSE diff --git a/os/net/tls/Make.defs b/external/mbedtls/Make.defs similarity index 53% rename from os/net/tls/Make.defs rename to external/mbedtls/Make.defs index 3ebe458..a3e8643 100644 --- a/os/net/tls/Make.defs +++ b/external/mbedtls/Make.defs @@ -52,33 +52,33 @@ ############################################################################ ifeq ($(CONFIG_NET_SECURITY_TLS),y) -SRC_CRYPTO_CSRCS = aes.c aesni.c arc4.c \ - asn1parse.c asn1write.c base64.c \ - bignum.c blowfish.c camellia.c \ - ccm.c cipher.c cipher_wrap.c \ - cmac.c ctr_drbg.c des.c dhm.c \ - ecdh.c ecdsa.c ecjpake.c ecp.c \ - ecp_curves.c entropy.c entropy_poll.c \ - error.c gcm.c havege.c \ - hmac_drbg.c md.c md2.c \ - md4.c md5.c md_wrap.c \ - memory_buffer_alloc.c oid.c \ - padlock.c pem.c pk.c \ - pk_wrap.c pkcs12.c pkcs5.c \ - pkparse.c pkwrite.c platform.c \ - ripemd160.c rsa.c sha1.c \ - sha256.c sha512.c threading.c \ - timing.c version.c \ - version_features.c xtea.c +SRC_CRYPTO_CSRCS = mbedtls/aes.c mbedtls/aesni.c mbedtls/arc4.c \ + mbedtls/asn1parse.c mbedtls/asn1write.c mbedtls/base64.c \ + mbedtls/bignum.c mbedtls/blowfish.c mbedtls/camellia.c \ + mbedtls/ccm.c mbedtls/cipher.c mbedtls/cipher_wrap.c \ + mbedtls/cmac.c mbedtls/ctr_drbg.c mbedtls/des.c mbedtls/dhm.c \ + mbedtls/ecdh.c mbedtls/ecdsa.c mbedtls/ecjpake.c mbedtls/ecp.c \ + mbedtls/ecp_curves.c mbedtls/entropy.c mbedtls/entropy_poll.c \ + mbedtls/error.c mbedtls/gcm.c mbedtls/havege.c \ + mbedtls/hmac_drbg.c mbedtls/md.c mbedtls/md2.c \ + mbedtls/md4.c mbedtls/md5.c mbedtls/md_wrap.c \ + mbedtls/memory_buffer_alloc.c mbedtls/oid.c \ + mbedtls/padlock.c mbedtls/pem.c mbedtls/pk.c \ + mbedtls/pk_wrap.c mbedtls/pkcs12.c mbedtls/pkcs5.c \ + mbedtls/pkparse.c mbedtls/pkwrite.c mbedtls/platform.c \ + mbedtls/ripemd160.c mbedtls/rsa.c mbedtls/sha1.c \ + mbedtls/sha256.c mbedtls/sha512.c mbedtls/threading.c \ + mbedtls/timing.c mbedtls/version.c \ + mbedtls/version_features.c mbedtls/xtea.c -SRC_X509_CSRCS = certs.c pkcs11.c x509.c \ - x509_create.c x509_crl.c x509_crt.c \ - x509_csr.c x509write_crt.c x509write_csr.c +SRC_X509_CSRCS = mbedtls/certs.c mbedtls/pkcs11.c mbedtls/x509.c \ + mbedtls/x509_create.c mbedtls/x509_crl.c mbedtls/x509_crt.c \ + mbedtls/x509_csr.c mbedtls/x509write_crt.c mbedtls/x509write_csr.c -SRC_TLS_CSRCS = debug.c net.c ssl_cache.c \ - ssl_ciphersuites.c ssl_tls.c \ - ssl_cli.c ssl_cookie.c ssl_srv.c \ - ssl_ticket.c easy_tls.c +SRC_TLS_CSRCS = mbedtls/debug.c mbedtls/net.c mbedtls/ssl_cache.c \ + mbedtls/ssl_ciphersuites.c mbedtls/ssl_tls.c \ + mbedtls/ssl_cli.c mbedtls/ssl_cookie.c mbedtls/ssl_srv.c \ + mbedtls/ssl_ticket.c mbedtls/easy_tls.c ifeq ($(CONFIG_TLS_WITH_SSS),y) SRC_SEE_CSRCS += see_api.c see_internal.c @@ -86,7 +86,9 @@ endif TLS_CSRCS += $(SRC_CRYPTO_CSRCS) $(SRC_X509_CSRCS) $(SRC_TLS_CSRCS) $(SRC_SEE_CSRCS) -DEPPATH += --dep-path tls -VPATH += :tls +CSRCS += $(TLS_CSRCS) + +DEPPATH += --dep-path mbedtls +VPATH += :mbedtls endif diff --git a/os/net/tls/aes.c b/external/mbedtls/aes.c similarity index 99% rename from os/net/tls/aes.c rename to external/mbedtls/aes.c index 5b45fbb..8c18146 100644 --- a/os/net/tls/aes.c +++ b/external/mbedtls/aes.c @@ -43,22 +43,22 @@ * http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_AES_C) #include -#include "tls/aes.h" +#include "mbedtls/aes.h" #if defined(MBEDTLS_PADLOCK_C) -#include "tls/padlock.h" +#include "mbedtls/padlock.h" #endif #if defined(MBEDTLS_AESNI_C) -#include "tls/aesni.h" +#include "mbedtls/aesni.h" #endif #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/aesni.c b/external/mbedtls/aesni.c similarity index 99% rename from os/net/tls/aesni.c rename to external/mbedtls/aesni.c index fbc78f6..f9ca0c0 100644 --- a/os/net/tls/aesni.c +++ b/external/mbedtls/aesni.c @@ -42,11 +42,11 @@ * [CLMUL-WP] http://software.intel.com/en-us/articles/intel-carry-less-multiplication-instruction-and-its-usage-for-computing-the-gcm-mode/ */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_AESNI_C) -#include "tls/aesni.h" +#include "mbedtls/aesni.h" #include diff --git a/os/include/tls/apache-2.0.txt b/external/mbedtls/apache-2.0.txt similarity index 100% rename from os/include/tls/apache-2.0.txt rename to external/mbedtls/apache-2.0.txt diff --git a/os/net/tls/arc4.c b/external/mbedtls/arc4.c similarity index 98% rename from os/net/tls/arc4.c rename to external/mbedtls/arc4.c index f2ef122..e8c4359 100644 --- a/os/net/tls/arc4.c +++ b/external/mbedtls/arc4.c @@ -42,17 +42,17 @@ * http://groups.google.com/group/sci.crypt/msg/10a300c9d21afca0 */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ARC4_C) -#include "tls/arc4.h" +#include "mbedtls/arc4.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/asn1parse.c b/external/mbedtls/asn1parse.c similarity index 98% rename from os/net/tls/asn1parse.c rename to external/mbedtls/asn1parse.c index a02b82c..0025873 100644 --- a/os/net/tls/asn1parse.c +++ b/external/mbedtls/asn1parse.c @@ -37,20 +37,20 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ASN1_PARSE_C) -#include "tls/asn1.h" +#include "mbedtls/asn1.h" #include #if defined(MBEDTLS_BIGNUM_C) -#include "tls/bignum.h" +#include "mbedtls/bignum.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/asn1write.c b/external/mbedtls/asn1write.c similarity index 99% rename from os/net/tls/asn1write.c rename to external/mbedtls/asn1write.c index df65829..b45eda4 100644 --- a/os/net/tls/asn1write.c +++ b/external/mbedtls/asn1write.c @@ -37,16 +37,16 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ASN1_WRITE_C) -#include "tls/asn1write.h" +#include "mbedtls/asn1write.h" #include #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/base64.c b/external/mbedtls/base64.c similarity index 98% rename from os/net/tls/base64.c rename to external/mbedtls/base64.c index 9085d3d..89fee1e 100644 --- a/os/net/tls/base64.c +++ b/external/mbedtls/base64.c @@ -37,18 +37,18 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_BASE64_C) -#include "tls/base64.h" +#include "mbedtls/base64.h" #include #if defined(MBEDTLS_SELF_TEST) #include #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/bignum.c b/external/mbedtls/bignum.c similarity index 99% rename from os/net/tls/bignum.c rename to external/mbedtls/bignum.c index d75f68e..9be582f 100644 --- a/os/net/tls/bignum.c +++ b/external/mbedtls/bignum.c @@ -54,20 +54,20 @@ */ #if !defined(MBEDTLS_CONFIG_FILE) -#include "tls/config.h" +#include "mbedtls/config.h" #else #include MBEDTLS_CONFIG_FILE #endif #if defined(MBEDTLS_BIGNUM_C) -#include "tls/bignum.h" -#include "tls/bn_mul.h" +#include "mbedtls/bignum.h" +#include "mbedtls/bn_mul.h" #include #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #include diff --git a/os/net/tls/blowfish.c b/external/mbedtls/blowfish.c similarity index 99% rename from os/net/tls/blowfish.c rename to external/mbedtls/blowfish.c index 0652b8a..8760c65 100644 --- a/os/net/tls/blowfish.c +++ b/external/mbedtls/blowfish.c @@ -43,11 +43,11 @@ * */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_BLOWFISH_C) -#include "tls/blowfish.h" +#include "mbedtls/blowfish.h" #include diff --git a/os/net/tls/camellia.c b/external/mbedtls/camellia.c similarity index 99% rename from os/net/tls/camellia.c rename to external/mbedtls/camellia.c index dcb299a..3cf9af8 100644 --- a/os/net/tls/camellia.c +++ b/external/mbedtls/camellia.c @@ -43,17 +43,17 @@ * http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/01espec.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_CAMELLIA_C) -#include "tls/camellia.h" +#include "mbedtls/camellia.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/ccm.c b/external/mbedtls/ccm.c similarity index 99% rename from os/net/tls/ccm.c rename to external/mbedtls/ccm.c index 33df731..f8d9212 100644 --- a/os/net/tls/ccm.c +++ b/external/mbedtls/ccm.c @@ -46,17 +46,17 @@ * RFC 5116 "An Interface and Algorithms for Authenticated Encryption" */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_CCM_C) -#include "tls/ccm.h" +#include "mbedtls/ccm.h" #include #if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/certs.c b/external/mbedtls/certs.c similarity index 99% rename from os/net/tls/certs.c rename to external/mbedtls/certs.c index a86da0c..d3b6db8 100644 --- a/os/net/tls/certs.c +++ b/external/mbedtls/certs.c @@ -37,8 +37,8 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" -#include "tls/certs.h" +#include "mbedtls/config.h" +#include "mbedtls/certs.h" #if defined(MBEDTLS_CERTS_C) diff --git a/os/net/tls/cipher.c b/external/mbedtls/cipher.c similarity index 99% rename from os/net/tls/cipher.c rename to external/mbedtls/cipher.c index fd61f21..d9d00cf 100644 --- a/os/net/tls/cipher.c +++ b/external/mbedtls/cipher.c @@ -41,30 +41,30 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_CIPHER_C) -#include "tls/cipher.h" -#include "tls/cipher_internal.h" +#include "mbedtls/cipher.h" +#include "mbedtls/cipher_internal.h" #include #include #if defined(MBEDTLS_GCM_C) -#include "tls/gcm.h" +#include "mbedtls/gcm.h" #endif #if defined(MBEDTLS_CCM_C) -#include "tls/ccm.h" +#include "mbedtls/ccm.h" #endif #if defined(MBEDTLS_CMAC_C) -#include "tls/cmac.h" +#include "mbedtls/cmac.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #define mbedtls_calloc calloc #define mbedtls_free free diff --git a/os/net/tls/cipher_wrap.c b/external/mbedtls/cipher_wrap.c similarity index 99% rename from os/net/tls/cipher_wrap.c rename to external/mbedtls/cipher_wrap.c index 9b1bb2b..cd6e502 100644 --- a/os/net/tls/cipher_wrap.c +++ b/external/mbedtls/cipher_wrap.c @@ -41,38 +41,38 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_CIPHER_C) -#include "tls/cipher_internal.h" +#include "mbedtls/cipher_internal.h" #if defined(MBEDTLS_AES_C) -#include "tls/aes.h" +#include "mbedtls/aes.h" #endif #if defined(MBEDTLS_ARC4_C) -#include "tls/arc4.h" +#include "mbedtls/arc4.h" #endif #if defined(MBEDTLS_CAMELLIA_C) -#include "tls/camellia.h" +#include "mbedtls/camellia.h" #endif #if defined(MBEDTLS_DES_C) -#include "tls/des.h" +#include "mbedtls/des.h" #endif #if defined(MBEDTLS_BLOWFISH_C) -#include "tls/blowfish.h" +#include "mbedtls/blowfish.h" #endif #if defined(MBEDTLS_GCM_C) -#include "tls/gcm.h" +#include "mbedtls/gcm.h" #endif #if defined(MBEDTLS_CCM_C) -#include "tls/ccm.h" +#include "mbedtls/ccm.h" #endif #if defined(MBEDTLS_CIPHER_NULL_CIPHER) @@ -80,7 +80,7 @@ #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/cmac.c b/external/mbedtls/cmac.c similarity index 99% rename from os/net/tls/cmac.c rename to external/mbedtls/cmac.c index f00229a..68df730 100644 --- a/os/net/tls/cmac.c +++ b/external/mbedtls/cmac.c @@ -58,19 +58,19 @@ */ #if !defined(MBEDTLS_CONFIG_FILE) -#include "tls/config.h" +#include "mbedtls/config.h" #else #include MBEDTLS_CONFIG_FILE #endif #if defined(MBEDTLS_CMAC_C) -#include "tls/cmac.h" +#include "mbedtls/cmac.h" #include #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/ctr_drbg.c b/external/mbedtls/ctr_drbg.c similarity index 99% rename from os/net/tls/ctr_drbg.c rename to external/mbedtls/ctr_drbg.c index 33a7e99..a390ac4 100644 --- a/os/net/tls/ctr_drbg.c +++ b/external/mbedtls/ctr_drbg.c @@ -42,11 +42,11 @@ * http://csrc.nist.gov/publications/nistpubs/800-90/SP800-90revised_March2007.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_CTR_DRBG_C) -#include "tls/ctr_drbg.h" +#include "mbedtls/ctr_drbg.h" #include @@ -56,7 +56,7 @@ #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/debug.c b/external/mbedtls/debug.c similarity index 99% rename from os/net/tls/debug.c rename to external/mbedtls/debug.c index 1e13afb..c0496f9 100644 --- a/os/net/tls/debug.c +++ b/external/mbedtls/debug.c @@ -37,12 +37,12 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_DEBUG_C) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc @@ -51,7 +51,7 @@ #define mbedtls_snprintf snprintf #endif -#include "tls/debug.h" +#include "mbedtls/debug.h" #include #include diff --git a/os/net/tls/des.c b/external/mbedtls/des.c similarity index 99% rename from os/net/tls/des.c rename to external/mbedtls/des.c index 7990f92..d9bd79b 100644 --- a/os/net/tls/des.c +++ b/external/mbedtls/des.c @@ -43,17 +43,17 @@ * http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_DES_C) -#include "tls/des.h" +#include "mbedtls/des.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/dhm.c b/external/mbedtls/dhm.c similarity index 99% rename from os/net/tls/dhm.c rename to external/mbedtls/dhm.c index 6aaad5e..3e40f1b 100644 --- a/os/net/tls/dhm.c +++ b/external/mbedtls/dhm.c @@ -45,24 +45,24 @@ * */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_DHM_C) -#include "tls/dhm.h" +#include "mbedtls/dhm.h" #include #if defined(MBEDTLS_PEM_PARSE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif #if defined(MBEDTLS_ASN1_PARSE_C) -#include "tls/asn1.h" +#include "mbedtls/asn1.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #include @@ -72,8 +72,8 @@ #endif #if defined(CONFIG_HW_DH_PARAM) -#include "tls/see_api.h" -#include "tls/see_internal.h" +#include "mbedtls/see_api.h" +#include "mbedtls/see_internal.h" #define DHM_MPI_EXPORT(X, n) \ MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(X, p + 2, n)); \ *p++ = (unsigned char)(n >> 8); \ diff --git a/os/net/tls/easy_tls.c b/external/mbedtls/easy_tls.c similarity index 99% rename from os/net/tls/easy_tls.c rename to external/mbedtls/easy_tls.c index 769e178..3b39be2 100644 --- a/os/net/tls/easy_tls.c +++ b/external/mbedtls/easy_tls.c @@ -19,7 +19,7 @@ #include #include -#include +#include "mbedtls/easy_tls.h" /**************************************************************************** * Pre-processor Definitions diff --git a/os/net/tls/ecdh.c b/external/mbedtls/ecdh.c similarity index 98% rename from os/net/tls/ecdh.c rename to external/mbedtls/ecdh.c index 8cad6d4..8f11f10 100644 --- a/os/net/tls/ecdh.c +++ b/external/mbedtls/ecdh.c @@ -44,17 +44,17 @@ * RFC 4492 */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ECDH_C) -#include "tls/ecdh.h" +#include "mbedtls/ecdh.h" #include #if defined(CONFIG_HW_ECDH_PARAM) -#include "tls/see_api.h" -#include "tls/see_internal.h" +#include "mbedtls/see_api.h" +#include "mbedtls/see_internal.h" #endif /* diff --git a/os/net/tls/ecdsa.c b/external/mbedtls/ecdsa.c similarity index 99% rename from os/net/tls/ecdsa.c rename to external/mbedtls/ecdsa.c index 7191b29..90c7671 100644 --- a/os/net/tls/ecdsa.c +++ b/external/mbedtls/ecdsa.c @@ -43,17 +43,17 @@ * SEC1 http://www.secg.org/index.php?action=secg,docs_secg */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ECDSA_C) -#include "tls/ecdsa.h" -#include "tls/asn1write.h" +#include "mbedtls/ecdsa.h" +#include "mbedtls/asn1write.h" #include #if defined(MBEDTLS_ECDSA_DETERMINISTIC) -#include "tls/hmac_drbg.h" +#include "mbedtls/hmac_drbg.h" #endif /* diff --git a/os/net/tls/ecjpake.c b/external/mbedtls/ecjpake.c similarity index 99% rename from os/net/tls/ecjpake.c rename to external/mbedtls/ecjpake.c index fedbd2c..4baceb7 100644 --- a/os/net/tls/ecjpake.c +++ b/external/mbedtls/ecjpake.c @@ -42,14 +42,14 @@ */ #if !defined(MBEDTLS_CONFIG_FILE) -#include "tls/config.h" +#include "mbedtls/config.h" #else #include MBEDTLS_CONFIG_FILE #endif #if defined(MBEDTLS_ECJPAKE_C) -#include "tls/ecjpake.h" +#include "mbedtls/ecjpake.h" #include @@ -662,7 +662,7 @@ cleanup: #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/ecp.c b/external/mbedtls/ecp.c similarity index 99% rename from os/net/tls/ecp.c rename to external/mbedtls/ecp.c index f7bdb11..bea4596 100644 --- a/os/net/tls/ecp.c +++ b/external/mbedtls/ecp.c @@ -58,16 +58,16 @@ * */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ECP_C) -#include "tls/ecp.h" +#include "mbedtls/ecp.h" #include #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #include diff --git a/os/net/tls/ecp_curves.c b/external/mbedtls/ecp_curves.c similarity index 99% rename from os/net/tls/ecp_curves.c rename to external/mbedtls/ecp_curves.c index 02c17ff..074d1fa 100644 --- a/os/net/tls/ecp_curves.c +++ b/external/mbedtls/ecp_curves.c @@ -37,11 +37,11 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ECP_C) -#include "tls/ecp.h" +#include "mbedtls/ecp.h" #include diff --git a/os/net/tls/entropy.c b/external/mbedtls/entropy.c similarity index 98% rename from os/net/tls/entropy.c rename to external/mbedtls/entropy.c index 394a2a7..431468c 100644 --- a/os/net/tls/entropy.c +++ b/external/mbedtls/entropy.c @@ -37,7 +37,7 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ENTROPY_C) @@ -47,8 +47,8 @@ #warning "**** THIS BUILD IS *NOT* SUITABLE FOR PRODUCTION USE " #endif -#include "tls/entropy.h" -#include "tls/entropy_poll.h" +#include "mbedtls/entropy.h" +#include "mbedtls/entropy_poll.h" #include @@ -57,12 +57,12 @@ #endif #if defined(MBEDTLS_ENTROPY_NV_SEED) -#include "tls/platform.h" +#include "mbedtls/platform.h" #endif #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf @@ -70,7 +70,7 @@ #endif /* MBEDTLS_SELF_TEST */ #if defined(MBEDTLS_HAVEGE_C) -#include "tls/havege.h" +#include "mbedtls/havege.h" #endif /* Implementation that should never be optimized out by the compiler */ diff --git a/os/net/tls/entropy_poll.c b/external/mbedtls/entropy_poll.c similarity index 97% rename from os/net/tls/entropy_poll.c rename to external/mbedtls/entropy_poll.c index 8d5fcde..f3a3aaa 100644 --- a/os/net/tls/entropy_poll.c +++ b/external/mbedtls/entropy_poll.c @@ -37,22 +37,22 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ENTROPY_C) -#include "tls/entropy.h" -#include "tls/entropy_poll.h" +#include "mbedtls/entropy.h" +#include "mbedtls/entropy_poll.h" #if defined(MBEDTLS_TIMING_C) #include -#include "tls/timing.h" +#include "mbedtls/timing.h" #endif #if defined(MBEDTLS_HAVEGE_C) -#include "tls/havege.h" +#include "mbedtls/havege.h" #endif #if defined(MBEDTLS_ENTROPY_NV_SEED) -#include "tls/platform.h" +#include "mbedtls/platform.h" #endif #if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) @@ -289,7 +289,7 @@ int mbedtls_nv_seed_poll(void *data, unsigned char *output, size_t len, size_t * #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) #if defined(CONFIG_HW_RNG) -#include "tls/see_api.h" +#include "mbedtls/see_api.h" int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t *olen) { diff --git a/os/net/tls/error.c b/external/mbedtls/error.c similarity index 97% rename from os/net/tls/error.c rename to external/mbedtls/error.c index 3e9f226..612a552 100644 --- a/os/net/tls/error.c +++ b/external/mbedtls/error.c @@ -37,15 +37,15 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_ERROR_C) || defined(MBEDTLS_ERROR_STRERROR_DUMMY) -#include "tls/error.h" +#include "mbedtls/error.h" #include #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #define mbedtls_snprintf snprintf #endif @@ -55,111 +55,111 @@ #include #if defined(MBEDTLS_AES_C) -#include "tls/aes.h" +#include "mbedtls/aes.h" #endif #if defined(MBEDTLS_BASE64_C) -#include "tls/base64.h" +#include "mbedtls/base64.h" #endif #if defined(MBEDTLS_BIGNUM_C) -#include "tls/bignum.h" +#include "mbedtls/bignum.h" #endif #if defined(MBEDTLS_BLOWFISH_C) -#include "tls/blowfish.h" +#include "mbedtls/blowfish.h" #endif #if defined(MBEDTLS_CAMELLIA_C) -#include "tls/camellia.h" +#include "mbedtls/camellia.h" #endif #if defined(MBEDTLS_CCM_C) -#include "tls/ccm.h" +#include "mbedtls/ccm.h" #endif #if defined(MBEDTLS_CIPHER_C) -#include "tls/cipher.h" +#include "mbedtls/cipher.h" #endif #if defined(MBEDTLS_CTR_DRBG_C) -#include "tls/ctr_drbg.h" +#include "mbedtls/ctr_drbg.h" #endif #if defined(MBEDTLS_DES_C) -#include "tls/des.h" +#include "mbedtls/des.h" #endif #if defined(MBEDTLS_DHM_C) -#include "tls/dhm.h" +#include "mbedtls/dhm.h" #endif #if defined(MBEDTLS_ECP_C) -#include "tls/ecp.h" +#include "mbedtls/ecp.h" #endif #if defined(MBEDTLS_ENTROPY_C) -#include "tls/entropy.h" +#include "mbedtls/entropy.h" #endif #if defined(MBEDTLS_GCM_C) -#include "tls/gcm.h" +#include "mbedtls/gcm.h" #endif #if defined(MBEDTLS_HMAC_DRBG_C) -#include "tls/hmac_drbg.h" +#include "mbedtls/hmac_drbg.h" #endif #if defined(MBEDTLS_MD_C) -#include "tls/md.h" +#include "mbedtls/md.h" #endif #if defined(MBEDTLS_NET_C) -#include "tls/net.h" +#include "mbedtls/net.h" #endif #if defined(MBEDTLS_OID_C) -#include "tls/oid.h" +#include "mbedtls/oid.h" #endif #if defined(MBEDTLS_PADLOCK_C) -#include "tls/padlock.h" +#include "mbedtls/padlock.h" #endif #if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif #if defined(MBEDTLS_PK_C) -#include "tls/pk.h" +#include "mbedtls/pk.h" #endif #if defined(MBEDTLS_PKCS12_C) -#include "tls/pkcs12.h" +#include "mbedtls/pkcs12.h" #endif #if defined(MBEDTLS_PKCS5_C) -#include "tls/pkcs5.h" +#include "mbedtls/pkcs5.h" #endif #if defined(MBEDTLS_RSA_C) -#include "tls/rsa.h" +#include "mbedtls/rsa.h" #endif #if defined(MBEDTLS_SSL_TLS_C) -#include "tls/ssl.h" +#include "mbedtls/ssl.h" #endif #if defined(MBEDTLS_THREADING_C) -#include "tls/threading.h" +#include "mbedtls/threading.h" #endif #if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) -#include "tls/x509.h" +#include "mbedtls/x509.h" #endif #if defined(MBEDTLS_XTEA_C) -#include "tls/xtea.h" +#include "mbedtls/xtea.h" #endif void mbedtls_strerror(int ret, char *buf, size_t buflen) diff --git a/os/net/tls/gcm.c b/external/mbedtls/gcm.c similarity index 99% rename from os/net/tls/gcm.c rename to external/mbedtls/gcm.c index 822f7d1..b76a83b 100644 --- a/os/net/tls/gcm.c +++ b/external/mbedtls/gcm.c @@ -47,21 +47,21 @@ * [MGV] 4.1, pp. 12-13, to enhance speed without using too much memory. */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_GCM_C) -#include "tls/gcm.h" +#include "mbedtls/gcm.h" #include #if defined(MBEDTLS_AESNI_C) -#include "tls/aesni.h" +#include "mbedtls/aesni.h" #endif #if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/havege.c b/external/mbedtls/havege.c similarity index 99% rename from os/net/tls/havege.c rename to external/mbedtls/havege.c index 7f5c35d..44902f1 100644 --- a/os/net/tls/havege.c +++ b/external/mbedtls/havege.c @@ -44,12 +44,12 @@ * Contact: seznec(at)irisa_dot_fr - orocheco(at)irisa_dot_fr */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_HAVEGE_C) -#include "tls/havege.h" -#include "tls/timing.h" +#include "mbedtls/havege.h" +#include "mbedtls/timing.h" #include diff --git a/os/net/tls/hmac_drbg.c b/external/mbedtls/hmac_drbg.c similarity index 99% rename from os/net/tls/hmac_drbg.c rename to external/mbedtls/hmac_drbg.c index d372da9..8e0a352 100644 --- a/os/net/tls/hmac_drbg.c +++ b/external/mbedtls/hmac_drbg.c @@ -43,11 +43,11 @@ * References below are based on rev. 1 (January 2012). */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_HMAC_DRBG_C) -#include "tls/hmac_drbg.h" +#include "mbedtls/hmac_drbg.h" #include @@ -57,7 +57,7 @@ #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/md.c b/external/mbedtls/md.c similarity index 99% rename from os/net/tls/md.c rename to external/mbedtls/md.c index 065c417..7436d0a 100644 --- a/os/net/tls/md.c +++ b/external/mbedtls/md.c @@ -41,15 +41,15 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_MD_C) -#include "tls/md.h" -#include "tls/md_internal.h" +#include "mbedtls/md.h" +#include "mbedtls/md_internal.h" #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/md2.c b/external/mbedtls/md2.c similarity index 98% rename from os/net/tls/md2.c rename to external/mbedtls/md2.c index caa6c12..dde5048 100644 --- a/os/net/tls/md2.c +++ b/external/mbedtls/md2.c @@ -43,17 +43,17 @@ * http://www.ietf.org/rfc/rfc1319.txt */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_MD2_C) -#include "tls/md2.h" +#include "mbedtls/md2.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/md4.c b/external/mbedtls/md4.c similarity index 99% rename from os/net/tls/md4.c rename to external/mbedtls/md4.c index ac963f0..8215973 100644 --- a/os/net/tls/md4.c +++ b/external/mbedtls/md4.c @@ -43,17 +43,17 @@ * http://www.ietf.org/rfc/rfc1320.txt */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_MD4_C) -#include "tls/md4.h" +#include "mbedtls/md4.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/md5.c b/external/mbedtls/md5.c similarity index 99% rename from os/net/tls/md5.c rename to external/mbedtls/md5.c index 94a48f6..36d1faf 100644 --- a/os/net/tls/md5.c +++ b/external/mbedtls/md5.c @@ -42,17 +42,17 @@ * http://www.ietf.org/rfc/rfc1321.txt */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_MD5_C) -#include "tls/md5.h" +#include "mbedtls/md5.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/md_wrap.c b/external/mbedtls/md_wrap.c similarity index 97% rename from os/net/tls/md_wrap.c rename to external/mbedtls/md_wrap.c index 234781f..3843c4d 100644 --- a/os/net/tls/md_wrap.c +++ b/external/mbedtls/md_wrap.c @@ -41,42 +41,42 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_MD_C) -#include "tls/md_internal.h" +#include "mbedtls/md_internal.h" #if defined(MBEDTLS_MD2_C) -#include "tls/md2.h" +#include "mbedtls/md2.h" #endif #if defined(MBEDTLS_MD4_C) -#include "tls/md4.h" +#include "mbedtls/md4.h" #endif #if defined(MBEDTLS_MD5_C) -#include "tls/md5.h" +#include "mbedtls/md5.h" #endif #if defined(MBEDTLS_RIPEMD160_C) -#include "tls/ripemd160.h" +#include "mbedtls/ripemd160.h" #endif #if defined(MBEDTLS_SHA1_C) -#include "tls/sha1.h" +#include "mbedtls/sha1.h" #endif #if defined(MBEDTLS_SHA256_C) -#include "tls/sha256.h" +#include "mbedtls/sha256.h" #endif #if defined(MBEDTLS_SHA512_C) -#include "tls/sha512.h" +#include "mbedtls/sha512.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/memory_buffer_alloc.c b/external/mbedtls/memory_buffer_alloc.c similarity index 99% rename from os/net/tls/memory_buffer_alloc.c rename to external/mbedtls/memory_buffer_alloc.c index f268ad3..534fc8c 100644 --- a/os/net/tls/memory_buffer_alloc.c +++ b/external/mbedtls/memory_buffer_alloc.c @@ -37,14 +37,14 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "tls/memory_buffer_alloc.h" +#include "mbedtls/memory_buffer_alloc.h" /* No need for the header guard as MBEDTLS_MEMORY_BUFFER_ALLOC_C is dependent upon MBEDTLS_PLATFORM_C */ -#include "tls/platform.h" +#include "mbedtls/platform.h" #include @@ -53,7 +53,7 @@ #endif #if defined(MBEDTLS_THREADING_C) -#include "tls/threading.h" +#include "mbedtls/threading.h" #endif /* Implementation that should never be optimized out by the compiler */ diff --git a/os/net/tls/net.c b/external/mbedtls/net.c similarity index 99% rename from os/net/tls/net.c rename to external/mbedtls/net.c index ce02416..831a249 100644 --- a/os/net/tls/net.c +++ b/external/mbedtls/net.c @@ -37,7 +37,7 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_NET_C) @@ -51,12 +51,12 @@ #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #endif -#include "tls/net_sockets.h" +#include "mbedtls/net_sockets.h" #include #include diff --git a/os/net/tls/oid.c b/external/mbedtls/oid.c similarity index 99% rename from os/net/tls/oid.c rename to external/mbedtls/oid.c index ecfbeb8..06bfaa9 100644 --- a/os/net/tls/oid.c +++ b/external/mbedtls/oid.c @@ -39,24 +39,24 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_OID_C) -#include "tls/oid.h" -#include "tls/rsa.h" +#include "mbedtls/oid.h" +#include "mbedtls/rsa.h" #include #include #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #define mbedtls_snprintf snprintf #endif #if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) -#include "tls/x509.h" +#include "mbedtls/x509.h" #endif /* diff --git a/os/net/tls/padlock.c b/external/mbedtls/padlock.c similarity index 98% rename from os/net/tls/padlock.c rename to external/mbedtls/padlock.c index 40af4cc..89c42c0 100644 --- a/os/net/tls/padlock.c +++ b/external/mbedtls/padlock.c @@ -43,11 +43,11 @@ * programming_guide.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_PADLOCK_C) -#include "tls/padlock.h" +#include "mbedtls/padlock.h" #include diff --git a/os/net/tls/pem.c b/external/mbedtls/pem.c similarity index 98% rename from os/net/tls/pem.c rename to external/mbedtls/pem.c index 0a036d1..4c907d4 100644 --- a/os/net/tls/pem.c +++ b/external/mbedtls/pem.c @@ -37,21 +37,21 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C) -#include "tls/pem.h" -#include "tls/base64.h" -#include "tls/des.h" -#include "tls/aes.h" -#include "tls/md5.h" -#include "tls/cipher.h" +#include "mbedtls/pem.h" +#include "mbedtls/base64.h" +#include "mbedtls/des.h" +#include "mbedtls/aes.h" +#include "mbedtls/md5.h" +#include "mbedtls/cipher.h" #include #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/pk.c b/external/mbedtls/pk.c similarity index 98% rename from os/net/tls/pk.c rename to external/mbedtls/pk.c index bd8884e..369f324 100644 --- a/os/net/tls/pk.c +++ b/external/mbedtls/pk.c @@ -37,20 +37,20 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_PK_C) -#include "tls/pk.h" -#include "tls/pk_internal.h" +#include "mbedtls/pk.h" +#include "mbedtls/pk_internal.h" #if defined(MBEDTLS_RSA_C) -#include "tls/rsa.h" +#include "mbedtls/rsa.h" #endif #if defined(MBEDTLS_ECP_C) -#include "tls/ecp.h" +#include "mbedtls/ecp.h" #endif #if defined(MBEDTLS_ECDSA_C) -#include "tls/ecdsa.h" +#include "mbedtls/ecdsa.h" #endif /* Implementation that should never be optimized out by the compiler */ diff --git a/os/net/tls/pk_wrap.c b/external/mbedtls/pk_wrap.c similarity index 98% rename from os/net/tls/pk_wrap.c rename to external/mbedtls/pk_wrap.c index d0efae0..a1a132f 100644 --- a/os/net/tls/pk_wrap.c +++ b/external/mbedtls/pk_wrap.c @@ -37,25 +37,25 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_PK_C) -#include "tls/pk_internal.h" +#include "mbedtls/pk_internal.h" /* Even if RSA not activated, for the sake of RSA-alt */ -#include "tls/rsa.h" +#include "mbedtls/rsa.h" #include #if defined(MBEDTLS_ECP_C) -#include "tls/ecp.h" +#include "mbedtls/ecp.h" #endif #if defined(MBEDTLS_ECDSA_C) -#include "tls/ecdsa.h" +#include "mbedtls/ecdsa.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc @@ -63,10 +63,10 @@ #endif #if defined(CONFIG_TLS_WITH_SSS) -#include "tls/see_api.h" -#include "tls/see_internal.h" +#include "mbedtls/see_api.h" +#include "mbedtls/see_internal.h" -#include "tls/asn1.h" +#include "mbedtls/asn1.h" #endif #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) diff --git a/os/net/tls/pkcs11.c b/external/mbedtls/pkcs11.c similarity index 97% rename from os/net/tls/pkcs11.c rename to external/mbedtls/pkcs11.c index 169c5ea..f918a7c 100644 --- a/os/net/tls/pkcs11.c +++ b/external/mbedtls/pkcs11.c @@ -41,16 +41,16 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/pkcs11.h" +#include "mbedtls/pkcs11.h" #if defined(MBEDTLS_PKCS11_C) -#include "tls/md.h" -#include "tls/oid.h" -#include "tls/x509_crt.h" +#include "mbedtls/md.h" +#include "mbedtls/oid.h" +#include "mbedtls/x509_crt.h" #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/pkcs12.c b/external/mbedtls/pkcs12.c similarity index 98% rename from os/net/tls/pkcs12.c rename to external/mbedtls/pkcs12.c index 9288267..2ce203d 100644 --- a/os/net/tls/pkcs12.c +++ b/external/mbedtls/pkcs12.c @@ -43,22 +43,22 @@ * ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-12/pkcs-12v1-1.asn */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_PKCS12_C) -#include "tls/pkcs12.h" -#include "tls/asn1.h" -#include "tls/cipher.h" +#include "mbedtls/pkcs12.h" +#include "mbedtls/asn1.h" +#include "mbedtls/cipher.h" #include #if defined(MBEDTLS_ARC4_C) -#include "tls/arc4.h" +#include "mbedtls/arc4.h" #endif #if defined(MBEDTLS_DES_C) -#include "tls/des.h" +#include "mbedtls/des.h" #endif /* Implementation that should never be optimized out by the compiler */ diff --git a/os/net/tls/pkcs5.c b/external/mbedtls/pkcs5.c similarity index 98% rename from os/net/tls/pkcs5.c rename to external/mbedtls/pkcs5.c index 859022e..531a05e 100644 --- a/os/net/tls/pkcs5.c +++ b/external/mbedtls/pkcs5.c @@ -47,19 +47,19 @@ * http://tools.ietf.org/html/rfc6070 (Test vectors) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_PKCS5_C) -#include "tls/pkcs5.h" -#include "tls/asn1.h" -#include "tls/cipher.h" -#include "tls/oid.h" +#include "mbedtls/pkcs5.h" +#include "mbedtls/asn1.h" +#include "mbedtls/cipher.h" +#include "mbedtls/oid.h" #include #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/pkparse.c b/external/mbedtls/pkparse.c similarity index 99% rename from os/net/tls/pkparse.c rename to external/mbedtls/pkparse.c index 65c886d..bb49045 100644 --- a/os/net/tls/pkparse.c +++ b/external/mbedtls/pkparse.c @@ -37,37 +37,37 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_PK_PARSE_C) -#include "tls/pk.h" -#include "tls/asn1.h" -#include "tls/oid.h" +#include "mbedtls/pk.h" +#include "mbedtls/asn1.h" +#include "mbedtls/oid.h" #include #if defined(MBEDTLS_RSA_C) -#include "tls/rsa.h" +#include "mbedtls/rsa.h" #endif #if defined(MBEDTLS_ECP_C) -#include "tls/ecp.h" +#include "mbedtls/ecp.h" #endif #if defined(MBEDTLS_ECDSA_C) -#include "tls/ecdsa.h" +#include "mbedtls/ecdsa.h" #endif #if defined(MBEDTLS_PEM_PARSE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif #if defined(MBEDTLS_PKCS5_C) -#include "tls/pkcs5.h" +#include "mbedtls/pkcs5.h" #endif #if defined(MBEDTLS_PKCS12_C) -#include "tls/pkcs12.h" +#include "mbedtls/pkcs12.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/pkwrite.c b/external/mbedtls/pkwrite.c similarity index 98% rename from os/net/tls/pkwrite.c rename to external/mbedtls/pkwrite.c index 091df65..f09dedd 100644 --- a/os/net/tls/pkwrite.c +++ b/external/mbedtls/pkwrite.c @@ -37,31 +37,31 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_PK_WRITE_C) -#include "tls/pk.h" -#include "tls/asn1write.h" -#include "tls/oid.h" +#include "mbedtls/pk.h" +#include "mbedtls/asn1write.h" +#include "mbedtls/oid.h" #include #if defined(MBEDTLS_RSA_C) -#include "tls/rsa.h" +#include "mbedtls/rsa.h" #endif #if defined(MBEDTLS_ECP_C) -#include "tls/ecp.h" +#include "mbedtls/ecp.h" #endif #if defined(MBEDTLS_ECDSA_C) -#include "tls/ecdsa.h" +#include "mbedtls/ecdsa.h" #endif #if defined(MBEDTLS_PEM_WRITE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc diff --git a/os/net/tls/platform.c b/external/mbedtls/platform.c similarity index 99% rename from os/net/tls/platform.c rename to external/mbedtls/platform.c index f2564eb..c3b7104 100644 --- a/os/net/tls/platform.c +++ b/external/mbedtls/platform.c @@ -37,11 +37,11 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #if defined(MBEDTLS_PLATFORM_MEMORY) #if !defined(MBEDTLS_PLATFORM_STD_CALLOC) diff --git a/os/net/tls/ripemd160.c b/external/mbedtls/ripemd160.c similarity index 99% rename from os/net/tls/ripemd160.c rename to external/mbedtls/ripemd160.c index d748506..b09909f 100644 --- a/os/net/tls/ripemd160.c +++ b/external/mbedtls/ripemd160.c @@ -43,17 +43,17 @@ * http://ehash.iaik.tugraz.at/wiki/RIPEMD-160 */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_RIPEMD160_C) -#include "tls/ripemd160.h" +#include "mbedtls/ripemd160.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/rsa.c b/external/mbedtls/rsa.c similarity index 99% rename from os/net/tls/rsa.c rename to external/mbedtls/rsa.c index 80b6372..83502b5 100644 --- a/os/net/tls/rsa.c +++ b/external/mbedtls/rsa.c @@ -49,17 +49,17 @@ * */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_RSA_C) -#include "tls/rsa.h" -#include "tls/oid.h" +#include "mbedtls/rsa.h" +#include "mbedtls/oid.h" #include #if defined(MBEDTLS_PKCS1_V21) -#include "tls/md.h" +#include "mbedtls/md.h" #endif #if defined(MBEDTLS_PKCS1_V15) && !defined(__OpenBSD__) @@ -67,7 +67,7 @@ #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf @@ -1483,7 +1483,7 @@ void mbedtls_rsa_free(mbedtls_rsa_context *ctx) #if defined(MBEDTLS_SELF_TEST) -#include "tls/sha1.h" +#include "mbedtls/sha1.h" /* * Example RSA-1024 keypair, for test purposes diff --git a/os/net/tls/see_api.c b/external/mbedtls/see_api.c similarity index 99% rename from os/net/tls/see_api.c rename to external/mbedtls/see_api.c index 1a03f2e..6216b93 100644 --- a/os/net/tls/see_api.c +++ b/external/mbedtls/see_api.c @@ -22,7 +22,7 @@ #include #include -#include "tls/see_api.h" +#include "mbedtls/see_api.h" see_mutex_t m_handler = { PTHREAD_MUTEX_INITIALIZER, 0 }; diff --git a/os/net/tls/see_internal.c b/external/mbedtls/see_internal.c similarity index 99% rename from os/net/tls/see_internal.c rename to external/mbedtls/see_internal.c index 41c589c..9bf4ae1 100644 --- a/os/net/tls/see_internal.c +++ b/external/mbedtls/see_internal.c @@ -23,7 +23,7 @@ #include #include -#include "tls/see_internal.h" +#include "mbedtls/see_internal.h" #if defined(CONFIG_HW_ECDH_PARAM) int see_generate_key_internal(unsigned int key_type, unsigned char *key_buf, diff --git a/os/net/tls/sha1.c b/external/mbedtls/sha1.c similarity index 99% rename from os/net/tls/sha1.c rename to external/mbedtls/sha1.c index 33286b3..c780376 100644 --- a/os/net/tls/sha1.c +++ b/external/mbedtls/sha1.c @@ -42,17 +42,17 @@ * http://www.itl.nist.gov/fipspubs/fip180-1.htm */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SHA1_C) -#include "tls/sha1.h" +#include "mbedtls/sha1.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/os/net/tls/sha256.c b/external/mbedtls/sha256.c similarity index 99% rename from os/net/tls/sha256.c rename to external/mbedtls/sha256.c index 6bb8761..ced7b85 100644 --- a/os/net/tls/sha256.c +++ b/external/mbedtls/sha256.c @@ -42,17 +42,17 @@ * http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SHA256_C) -#include "tls/sha256.h" +#include "mbedtls/sha256.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #include diff --git a/os/net/tls/sha512.c b/external/mbedtls/sha512.c similarity index 99% rename from os/net/tls/sha512.c rename to external/mbedtls/sha512.c index ea4e495..9e5bba8 100644 --- a/os/net/tls/sha512.c +++ b/external/mbedtls/sha512.c @@ -42,11 +42,11 @@ * http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SHA512_C) -#include "tls/sha512.h" +#include "mbedtls/sha512.h" #if defined(_MSC_VER) || defined(__WATCOMC__) #define UL64(x) x##ui64 @@ -58,7 +58,7 @@ #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #include diff --git a/os/net/tls/ssl_cache.c b/external/mbedtls/ssl_cache.c similarity index 98% rename from os/net/tls/ssl_cache.c rename to external/mbedtls/ssl_cache.c index 350157c..5782b0a 100644 --- a/os/net/tls/ssl_cache.c +++ b/external/mbedtls/ssl_cache.c @@ -41,19 +41,19 @@ * to store and retrieve the session information. */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SSL_CACHE_C) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc #define mbedtls_free free #endif -#include "tls/ssl_cache.h" +#include "mbedtls/ssl_cache.h" #include diff --git a/os/net/tls/ssl_ciphersuites.c b/external/mbedtls/ssl_ciphersuites.c similarity index 99% rename from os/net/tls/ssl_ciphersuites.c rename to external/mbedtls/ssl_ciphersuites.c index 25c82de..c23aaea 100644 --- a/os/net/tls/ssl_ciphersuites.c +++ b/external/mbedtls/ssl_ciphersuites.c @@ -39,18 +39,18 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SSL_TLS_C) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #endif -#include "tls/ssl_ciphersuites.h" -#include "tls/ssl.h" +#include "mbedtls/ssl_ciphersuites.h" +#include "mbedtls/ssl.h" #include diff --git a/os/net/tls/ssl_cli.c b/external/mbedtls/ssl_cli.c similarity index 99% rename from os/net/tls/ssl_cli.c rename to external/mbedtls/ssl_cli.c index 68a26f1..aa550cf 100644 --- a/os/net/tls/ssl_cli.c +++ b/external/mbedtls/ssl_cli.c @@ -37,12 +37,12 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SSL_CLI_C) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc @@ -52,12 +52,12 @@ #include #include -#include "tls/debug.h" -#include "tls/ssl.h" -#include "tls/ssl_internal.h" +#include "mbedtls/debug.h" +#include "mbedtls/ssl.h" +#include "mbedtls/ssl_internal.h" #if defined(MBEDTLS_HAVE_TIME) -#include "tls/platform_time.h" +#include "mbedtls/platform_time.h" #endif #if defined(MBEDTLS_SSL_SESSION_TICKETS) diff --git a/os/net/tls/ssl_cookie.c b/external/mbedtls/ssl_cookie.c similarity index 97% rename from os/net/tls/ssl_cookie.c rename to external/mbedtls/ssl_cookie.c index 501cbe5..2113b20 100644 --- a/os/net/tls/ssl_cookie.c +++ b/external/mbedtls/ssl_cookie.c @@ -41,22 +41,22 @@ * to store and retrieve the session information. */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SSL_COOKIE_C) -#include "tls/ssl_cookie.h" -#include "tls/ssl_internal.h" +#include "mbedtls/ssl_cookie.h" +#include "mbedtls/ssl_internal.h" #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #define mbedtls_calloc calloc #define mbedtls_free free #endif -#include "tls/ssl_cookie.h" -#include "tls/ssl_internal.h" +#include "mbedtls/ssl_cookie.h" +#include "mbedtls/ssl_internal.h" #include diff --git a/os/net/tls/ssl_srv.c b/external/mbedtls/ssl_srv.c similarity index 99% rename from os/net/tls/ssl_srv.c rename to external/mbedtls/ssl_srv.c index d53c5a3..53f25b7 100644 --- a/os/net/tls/ssl_srv.c +++ b/external/mbedtls/ssl_srv.c @@ -37,30 +37,30 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SSL_SRV_C) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc #define mbedtls_free free #endif -#include "tls/debug.h" -#include "tls/ssl.h" -#include "tls/ssl_internal.h" +#include "mbedtls/debug.h" +#include "mbedtls/ssl.h" +#include "mbedtls/ssl_internal.h" #include #if defined(MBEDTLS_ECP_C) -#include "tls/ecp.h" +#include "mbedtls/ecp.h" #endif #if defined(MBEDTLS_HAVE_TIME) -#include "tls/platform_time.h" +#include "mbedtls/platform_time.h" #endif #if defined(MBEDTLS_SSL_SESSION_TICKETS) diff --git a/os/net/tls/ssl_ticket.c b/external/mbedtls/ssl_ticket.c similarity index 99% rename from os/net/tls/ssl_ticket.c rename to external/mbedtls/ssl_ticket.c index 0deb3d0..4d75306 100644 --- a/os/net/tls/ssl_ticket.c +++ b/external/mbedtls/ssl_ticket.c @@ -37,21 +37,21 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SSL_TICKET_C) -#include "tls/ssl_ticket.h" +#include "mbedtls/ssl_ticket.h" #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc #define mbedtls_free free #endif -#include "tls/ssl_ticket.h" +#include "mbedtls/ssl_ticket.h" #include diff --git a/os/net/tls/ssl_tls.c b/external/mbedtls/ssl_tls.c similarity index 99% rename from os/net/tls/ssl_tls.c rename to external/mbedtls/ssl_tls.c index fa3c765..4331bd0 100644 --- a/os/net/tls/ssl_tls.c +++ b/external/mbedtls/ssl_tls.c @@ -46,7 +46,7 @@ */ #if !defined(MBEDTLS_CONFIG_FILE) -#include "tls/config.h" +#include "mbedtls/config.h" #else #include MBEDTLS_CONFIG_FILE #endif @@ -54,21 +54,21 @@ #if defined(MBEDTLS_SSL_TLS_C) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_calloc calloc #define mbedtls_free free #endif -#include "tls/debug.h" -#include "tls/ssl.h" -#include "tls/ssl_internal.h" +#include "mbedtls/debug.h" +#include "mbedtls/ssl.h" +#include "mbedtls/ssl_internal.h" #include #if defined(MBEDTLS_X509_CRT_PARSE_C) -#include "tls/oid.h" +#include "mbedtls/oid.h" #endif /* Implementation that should never be optimized out by the compiler */ diff --git a/os/net/tls/threading.c b/external/mbedtls/threading.c similarity index 98% rename from os/net/tls/threading.c rename to external/mbedtls/threading.c index 48fdc66..137dfd1 100644 --- a/os/net/tls/threading.c +++ b/external/mbedtls/threading.c @@ -37,11 +37,11 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_THREADING_C) -#include "tls/threading.h" +#include "mbedtls/threading.h" #if defined(MBEDTLS_THREADING_PTHREAD) static void threading_mutex_init_pthread(mbedtls_threading_mutex_t *mutex) diff --git a/os/net/tls/timing.c b/external/mbedtls/timing.c similarity index 99% rename from os/net/tls/timing.c rename to external/mbedtls/timing.c index 09af7b4..eac1488 100644 --- a/os/net/tls/timing.c +++ b/external/mbedtls/timing.c @@ -37,10 +37,10 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf @@ -48,7 +48,7 @@ #if defined(MBEDTLS_TIMING_C) -#include "tls/timing.h" +#include "mbedtls/timing.h" #ifndef asm #define asm __asm diff --git a/os/net/tls/version.c b/external/mbedtls/version.c similarity index 97% rename from os/net/tls/version.c rename to external/mbedtls/version.c index 17ff485..83c7453 100644 --- a/os/net/tls/version.c +++ b/external/mbedtls/version.c @@ -37,11 +37,11 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_VERSION_C) -#include "tls/version.h" +#include "mbedtls/version.h" #include unsigned int mbedtls_version_get_number() diff --git a/os/net/tls/version_features.c b/external/mbedtls/version_features.c similarity index 99% rename from os/net/tls/version_features.c rename to external/mbedtls/version_features.c index 15d7b6e..008af00 100644 --- a/os/net/tls/version_features.c +++ b/external/mbedtls/version_features.c @@ -37,11 +37,11 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_VERSION_C) -#include "tls/version.h" +#include "mbedtls/version.h" #include diff --git a/os/net/tls/x509.c b/external/mbedtls/x509.c similarity index 99% rename from os/net/tls/x509.c rename to external/mbedtls/x509.c index c631f4b..e07f2ac 100644 --- a/os/net/tls/x509.c +++ b/external/mbedtls/x509.c @@ -47,23 +47,23 @@ * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_X509_USE_C) -#include "tls/x509.h" -#include "tls/asn1.h" -#include "tls/oid.h" +#include "mbedtls/x509.h" +#include "mbedtls/asn1.h" +#include "mbedtls/oid.h" #include #include #if defined(MBEDTLS_PEM_PARSE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #include @@ -74,7 +74,7 @@ #endif #if defined(MBEDTLS_HAVE_TIME) -#include "tls/platform_time.h" +#include "mbedtls/platform_time.h" #endif #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) @@ -1002,8 +1002,8 @@ int mbedtls_x509_time_is_future(const mbedtls_x509_time *from) #if defined(MBEDTLS_SELF_TEST) -#include "tls/x509_crt.h" -#include "tls/certs.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/certs.h" /* * Checkup routine diff --git a/os/net/tls/x509_create.c b/external/mbedtls/x509_create.c similarity index 98% rename from os/net/tls/x509_create.c rename to external/mbedtls/x509_create.c index af53a8f..ee7eb64 100644 --- a/os/net/tls/x509_create.c +++ b/external/mbedtls/x509_create.c @@ -37,13 +37,13 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_X509_CREATE_C) -#include "tls/x509.h" -#include "tls/asn1write.h" -#include "tls/oid.h" +#include "mbedtls/x509.h" +#include "mbedtls/asn1write.h" +#include "mbedtls/oid.h" #include diff --git a/os/net/tls/x509_crl.c b/external/mbedtls/x509_crl.c similarity index 99% rename from os/net/tls/x509_crl.c rename to external/mbedtls/x509_crl.c index 0fcbcff..590a948 100644 --- a/os/net/tls/x509_crl.c +++ b/external/mbedtls/x509_crl.c @@ -47,21 +47,21 @@ * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_X509_CRL_PARSE_C) -#include "tls/x509_crl.h" -#include "tls/oid.h" +#include "mbedtls/x509_crl.h" +#include "mbedtls/oid.h" #include #if defined(MBEDTLS_PEM_PARSE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #include diff --git a/os/net/tls/x509_crt.c b/external/mbedtls/x509_crt.c similarity index 99% rename from os/net/tls/x509_crt.c rename to external/mbedtls/x509_crt.c index 090c4a5..586e85b 100644 --- a/os/net/tls/x509_crt.c +++ b/external/mbedtls/x509_crt.c @@ -47,22 +47,22 @@ * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_X509_CRT_PARSE_C) -#include "tls/x509_crt.h" -#include "tls/oid.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/oid.h" #include #include #if defined(MBEDTLS_PEM_PARSE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_free free @@ -71,7 +71,7 @@ #endif #if defined(MBEDTLS_THREADING_C) -#include "tls/threading.h" +#include "mbedtls/threading.h" #endif #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) diff --git a/os/net/tls/x509_csr.c b/external/mbedtls/x509_csr.c similarity index 98% rename from os/net/tls/x509_csr.c rename to external/mbedtls/x509_csr.c index ee6b321..78ef74a 100644 --- a/os/net/tls/x509_csr.c +++ b/external/mbedtls/x509_csr.c @@ -47,21 +47,21 @@ * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_X509_CSR_PARSE_C) -#include "tls/x509_csr.h" -#include "tls/oid.h" +#include "mbedtls/x509_csr.h" +#include "mbedtls/oid.h" #include #if defined(MBEDTLS_PEM_PARSE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #include diff --git a/os/net/tls/x509write_crt.c b/external/mbedtls/x509write_crt.c similarity index 98% rename from os/net/tls/x509write_crt.c rename to external/mbedtls/x509write_crt.c index baad6e3..6a47142 100644 --- a/os/net/tls/x509write_crt.c +++ b/external/mbedtls/x509write_crt.c @@ -43,19 +43,19 @@ * - attributes: PKCS#9 v2.0 aka RFC 2985 */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_X509_CRT_WRITE_C) -#include "tls/x509_crt.h" -#include "tls/oid.h" -#include "tls/asn1write.h" -#include "tls/sha1.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/oid.h" +#include "mbedtls/asn1write.h" +#include "mbedtls/sha1.h" #include #if defined(MBEDTLS_PEM_WRITE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif /* MBEDTLS_PEM_WRITE_C */ /* Implementation that should never be optimized out by the compiler */ diff --git a/os/net/tls/x509write_csr.c b/external/mbedtls/x509write_csr.c similarity index 98% rename from os/net/tls/x509write_csr.c rename to external/mbedtls/x509write_csr.c index af92a47..eea2a63 100644 --- a/os/net/tls/x509write_csr.c +++ b/external/mbedtls/x509write_csr.c @@ -42,19 +42,19 @@ * - attributes: PKCS#9 v2.0 aka RFC 2985 */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_X509_CSR_WRITE_C) -#include "tls/x509_csr.h" -#include "tls/oid.h" -#include "tls/asn1write.h" +#include "mbedtls/x509_csr.h" +#include "mbedtls/oid.h" +#include "mbedtls/asn1write.h" #include #include #if defined(MBEDTLS_PEM_WRITE_C) -#include "tls/pem.h" +#include "mbedtls/pem.h" #endif /* Implementation that should never be optimized out by the compiler */ diff --git a/os/net/tls/xtea.c b/external/mbedtls/xtea.c similarity index 98% rename from os/net/tls/xtea.c rename to external/mbedtls/xtea.c index 9fa4a17..6a394c2 100644 --- a/os/net/tls/xtea.c +++ b/external/mbedtls/xtea.c @@ -37,17 +37,17 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#include "tls/config.h" +#include "mbedtls/config.h" #if defined(MBEDTLS_XTEA_C) -#include "tls/xtea.h" +#include "mbedtls/xtea.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) -#include "tls/platform.h" +#include "mbedtls/platform.h" #else #include #define mbedtls_printf printf diff --git a/external/mosquitto/config.h b/external/mosquitto/config.h index 2e1bf72..3c57f27 100644 --- a/external/mosquitto/config.h +++ b/external/mosquitto/config.h @@ -49,11 +49,11 @@ #endif #ifdef WITH_MBEDTLS -#include "tls/ssl.h" -#include "tls/net.h" -#include "tls/x509_crt.h" -#include "tls/pk.h" -#include "tls/ctr_drbg.h" -#include "tls/ssl_cache.h" -#include "tls/entropy.h" +#include "mbedtls/ssl.h" +#include "mbedtls/net.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/pk.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/ssl_cache.h" +#include "mbedtls/entropy.h" #endif diff --git a/external/mosquitto/mosquitto_internal.h b/external/mosquitto/mosquitto_internal.h index 6ce6eaa..b3b0602 100644 --- a/external/mosquitto/mosquitto_internal.h +++ b/external/mosquitto/mosquitto_internal.h @@ -44,7 +44,7 @@ Contributors: # include #else # ifdef WITH_MBEDTLS -# include +# include "mbedtls/ssl.h" # else # include # endif diff --git a/external/webserver/http_client.h b/external/webserver/http_client.h index 0456a1b..73b3b48 100644 --- a/external/webserver/http_client.h +++ b/external/webserver/http_client.h @@ -24,16 +24,16 @@ #include #ifdef CONFIG_NET_SECURITY_TLS -#include "tls/config.h" -#include "tls/entropy.h" -#include "tls/ctr_drbg.h" -#include "tls/certs.h" -#include "tls/x509.h" -#include "tls/ssl.h" -#include "tls/net.h" -#include "tls/error.h" -#include "tls/debug.h" -#include "tls/ssl_cache.h" +#include "mbedtls/config.h" +#include "mbedtls/entropy.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/certs.h" +#include "mbedtls/x509.h" +#include "mbedtls/ssl.h" +#include "mbedtls/net.h" +#include "mbedtls/error.h" +#include "mbedtls/debug.h" +#include "mbedtls/ssl_cache.h" #endif enum { diff --git a/external/websocket/websocket.c b/external/websocket/websocket.c index 3f97f54..de889ef 100644 --- a/external/websocket/websocket.c +++ b/external/websocket/websocket.c @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include "mbedtls/sha1.h" +#include "mbedtls/base64.h" #include #include #include diff --git a/framework/src/mqtt/config.h b/framework/src/mqtt/config.h index 2e1bf72..3c57f27 100644 --- a/framework/src/mqtt/config.h +++ b/framework/src/mqtt/config.h @@ -49,11 +49,11 @@ #endif #ifdef WITH_MBEDTLS -#include "tls/ssl.h" -#include "tls/net.h" -#include "tls/x509_crt.h" -#include "tls/pk.h" -#include "tls/ctr_drbg.h" -#include "tls/ssl_cache.h" -#include "tls/entropy.h" +#include "mbedtls/ssl.h" +#include "mbedtls/net.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/pk.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/ssl_cache.h" +#include "mbedtls/entropy.h" #endif diff --git a/os/net/Kconfig b/os/net/Kconfig index 79511d6..dc420c5 100644 --- a/os/net/Kconfig +++ b/os/net/Kconfig @@ -34,14 +34,7 @@ if NET_LWIP source net/lwip/configs/Kconfig endif #NET_LWIP -config NET_SECURITY_TLS - bool "TLS Support" - default n - depends on LIBC_NETDB -if NET_SECURITY_TLS -source net/tls/Kconfig -endif #NET_SECURITY_TLS menu "Driver buffer configuration" @@ -130,6 +123,15 @@ source "$EXTERNALDIR/netlib/Kconfig.protocl" source "../framework/src/mqtt/Kconfig.protocol" +config NET_SECURITY_TLS + bool "TLS Support" + default n + depends on LIBC_NETDB + +if NET_SECURITY_TLS +source "$EXTERNALDIR/mbedtls/Kconfig.protocol" +endif #NET_SECURITY_TLS + endmenu #Protocols diff --git a/os/net/Makefile b/os/net/Makefile index 7e7e548..86e9296 100644 --- a/os/net/Makefile +++ b/os/net/Makefile @@ -75,13 +75,6 @@ SOCK_CSRCS = NETDEV_ASRCS = NETDEV_CSRCS = -#tls support - -ifeq ($(CONFIG_NET_SECURITY_TLS),y) -TLS_ASRCS = -TLS_CSRCS = -endif - VPATH = DEPPATH = --dep-path . @@ -107,10 +100,6 @@ endif include route/Make.defs include utils/Make.defs -ifeq ($(CONFIG_NET_SECURITY_TLS),y) -include tls/Make.defs -endif - endif ASRCS = $(SOCK_ASRCS) $(NETDEV_ASRCS) $(NET_ASRCS) $(TLS_ASRCS) $(LWIP_ASRCS)