Rename include directory to mbedtls
diff --git a/Makefile b/Makefile
index ca190cc..e570271 100644
--- a/Makefile
+++ b/Makefile
@@ -17,8 +17,8 @@
 	cd library  && $(MAKE) all && cd ..
 
 install:
-	mkdir -p $(DESTDIR)/include/polarssl
-	cp -r include/polarssl $(DESTDIR)/include
+	mkdir -p $(DESTDIR)/include/mbedtls
+	cp -r include/mbedtls $(DESTDIR)/include
 	
 	mkdir -p $(DESTDIR)/lib
 	cp library/libmbedtls.* $(DESTDIR)/lib
@@ -34,7 +34,7 @@
 	done
 
 uninstall:
-	rm -rf $(DESTDIR)/include/polarssl
+	rm -rf $(DESTDIR)/include/mbedtls
 	rm -f $(DESTDIR)/lib/libmbedtls.*
 	
 	for p in programs/*/* ; do              \
diff --git a/README.rst b/README.rst
index 03aec31..66e823a 100644
--- a/README.rst
+++ b/README.rst
@@ -5,7 +5,7 @@
 Configuration
 =============
 
-mbed TLS should build out of the box on most systems. Some platform specific options are available in the fully-documented configuration file *include/polarssl/config.h*, which is also the place where features can be selected.
+mbed TLS should build out of the box on most systems. Some platform specific options are available in the fully-documented configuration file *include/mbedtls/config.h*, which is also the place where features can be selected.
 This file can be edited manually, or in a more programmatic way using the Perl
 script *scripts/config.pl* (use *--help* for usage instructions).
 
diff --git a/configs/README.txt b/configs/README.txt
index 4a0074c..6be64a2 100644
--- a/configs/README.txt
+++ b/configs/README.txt
@@ -7,9 +7,9 @@
 These files are complete replacements for the default config.h. To use one of
 them, you can pick one of the following methods:
 
-1. Replace the default file include/polarssl/config.h with the chosen one.
+1. Replace the default file include/mbedtls/config.h with the chosen one.
    (Depending on your compiler, you may need to ajust the line with
-   #include "polarssl/check_config.h" then.)
+   #include "mbedtls/check_config.h" then.)
 
 2. Define POLARSSL_CONFIG_FILE and adjust the include path accordingly.
    For example, using make:
diff --git a/configs/config-ccm-psk-tls1_2.h b/configs/config-ccm-psk-tls1_2.h
index 776179d..3844383 100644
--- a/configs/config-ccm-psk-tls1_2.h
+++ b/configs/config-ccm-psk-tls1_2.h
@@ -57,7 +57,7 @@
 
 /*
  * Save RAM at the expense of interoperability: do this only if you control
- * both ends of the connection!  (See comments in "polarssl/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 SSL_MAX_CONTENT_LEN             512
diff --git a/configs/config-mini-tls1_1.h b/configs/config-mini-tls1_1.h
index 3bd1b1f..ab04193 100644
--- a/configs/config-mini-tls1_1.h
+++ b/configs/config-mini-tls1_1.h
@@ -52,6 +52,6 @@
 /* For testing with compat.sh */
 #define POLARSSL_FS_IO
 
-#include "polarssl/check_config.h"
+#include "mbedtls/check_config.h"
 
 #endif /* POLARSSL_CONFIG_H */
diff --git a/configs/config-psk-rc4-tls1_0.h b/configs/config-psk-rc4-tls1_0.h
index b8113ea..bb82f91 100644
--- a/configs/config-psk-rc4-tls1_0.h
+++ b/configs/config-psk-rc4-tls1_0.h
@@ -36,6 +36,6 @@
 #define POLARSSL_SSL_SRV_C
 #define POLARSSL_SSL_TLS_C
 
-#include "polarssl/check_config.h"
+#include "mbedtls/check_config.h"
 
 #endif /* POLARSSL_CONFIG_H */
diff --git a/configs/config-suite-b.h b/configs/config-suite-b.h
index 3e8f153..5c58f25 100644
--- a/configs/config-suite-b.h
+++ b/configs/config-suite-b.h
@@ -85,12 +85,12 @@
 
 /*
  * Save RAM at the expense of interoperability: do this only if you control
- * both ends of the connection!  (See coments in "polarssl/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 SSL_MAX_CONTENT_LEN             1024
 
-#include "polarssl/check_config.h"
+#include "mbedtls/check_config.h"
 
 #endif /* POLARSSL_CONFIG_H */
diff --git a/include/.gitignore b/include/.gitignore
index 53a36d4..bf67d02 100644
--- a/include/.gitignore
+++ b/include/.gitignore
@@ -1,4 +1,4 @@
 Makefile
 *.sln
 *.vcxproj
-polarssl/check_config
+mbedtls/check_config
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 2c56858..ce0ed6b 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -2,10 +2,10 @@
 
 if(INSTALL_MBEDTLS_HEADERS)
 
-file(GLOB headers "polarssl/*.h")
+file(GLOB headers "mbedtls/*.h")
 
 install(FILES ${headers}
-        DESTINATION include/polarssl
+        DESTINATION include/mbedtls
         PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
 
 endif(INSTALL_MBEDTLS_HEADERS)
diff --git a/include/polarssl/aes.h b/include/mbedtls/aes.h
similarity index 100%
rename from include/polarssl/aes.h
rename to include/mbedtls/aes.h
diff --git a/include/polarssl/aesni.h b/include/mbedtls/aesni.h
similarity index 100%
rename from include/polarssl/aesni.h
rename to include/mbedtls/aesni.h
diff --git a/include/polarssl/arc4.h b/include/mbedtls/arc4.h
similarity index 100%
rename from include/polarssl/arc4.h
rename to include/mbedtls/arc4.h
diff --git a/include/polarssl/asn1.h b/include/mbedtls/asn1.h
similarity index 100%
rename from include/polarssl/asn1.h
rename to include/mbedtls/asn1.h
diff --git a/include/polarssl/asn1write.h b/include/mbedtls/asn1write.h
similarity index 100%
rename from include/polarssl/asn1write.h
rename to include/mbedtls/asn1write.h
diff --git a/include/polarssl/base64.h b/include/mbedtls/base64.h
similarity index 100%
rename from include/polarssl/base64.h
rename to include/mbedtls/base64.h
diff --git a/include/polarssl/bignum.h b/include/mbedtls/bignum.h
similarity index 100%
rename from include/polarssl/bignum.h
rename to include/mbedtls/bignum.h
diff --git a/include/polarssl/blowfish.h b/include/mbedtls/blowfish.h
similarity index 100%
rename from include/polarssl/blowfish.h
rename to include/mbedtls/blowfish.h
diff --git a/include/polarssl/bn_mul.h b/include/mbedtls/bn_mul.h
similarity index 100%
rename from include/polarssl/bn_mul.h
rename to include/mbedtls/bn_mul.h
diff --git a/include/polarssl/camellia.h b/include/mbedtls/camellia.h
similarity index 100%
rename from include/polarssl/camellia.h
rename to include/mbedtls/camellia.h
diff --git a/include/polarssl/ccm.h b/include/mbedtls/ccm.h
similarity index 100%
rename from include/polarssl/ccm.h
rename to include/mbedtls/ccm.h
diff --git a/include/polarssl/certs.h b/include/mbedtls/certs.h
similarity index 100%
rename from include/polarssl/certs.h
rename to include/mbedtls/certs.h
diff --git a/include/polarssl/check_config.h b/include/mbedtls/check_config.h
similarity index 100%
rename from include/polarssl/check_config.h
rename to include/mbedtls/check_config.h
diff --git a/include/polarssl/cipher.h b/include/mbedtls/cipher.h
similarity index 100%
rename from include/polarssl/cipher.h
rename to include/mbedtls/cipher.h
diff --git a/include/polarssl/cipher_wrap.h b/include/mbedtls/cipher_wrap.h
similarity index 100%
rename from include/polarssl/cipher_wrap.h
rename to include/mbedtls/cipher_wrap.h
diff --git a/include/polarssl/config.h b/include/mbedtls/config.h
similarity index 99%
rename from include/polarssl/config.h
rename to include/mbedtls/config.h
index 33309b5..4cf879e 100644
--- a/include/polarssl/config.h
+++ b/include/mbedtls/config.h
@@ -75,7 +75,7 @@
  * Used in:
  *      library/timing.c
  *      library/padlock.c
- *      include/polarssl/bn_mul.h
+ *      include/mbedtls/bn_mul.h
  *
  * Comment to disable the use of assembly code.
  */
diff --git a/include/polarssl/ctr_drbg.h b/include/mbedtls/ctr_drbg.h
similarity index 100%
rename from include/polarssl/ctr_drbg.h
rename to include/mbedtls/ctr_drbg.h
diff --git a/include/polarssl/debug.h b/include/mbedtls/debug.h
similarity index 100%
rename from include/polarssl/debug.h
rename to include/mbedtls/debug.h
diff --git a/include/polarssl/des.h b/include/mbedtls/des.h
similarity index 100%
rename from include/polarssl/des.h
rename to include/mbedtls/des.h
diff --git a/include/polarssl/dhm.h b/include/mbedtls/dhm.h
similarity index 100%
rename from include/polarssl/dhm.h
rename to include/mbedtls/dhm.h
diff --git a/include/polarssl/ecdh.h b/include/mbedtls/ecdh.h
similarity index 100%
rename from include/polarssl/ecdh.h
rename to include/mbedtls/ecdh.h
diff --git a/include/polarssl/ecdsa.h b/include/mbedtls/ecdsa.h
similarity index 100%
rename from include/polarssl/ecdsa.h
rename to include/mbedtls/ecdsa.h
diff --git a/include/polarssl/ecp.h b/include/mbedtls/ecp.h
similarity index 100%
rename from include/polarssl/ecp.h
rename to include/mbedtls/ecp.h
diff --git a/include/polarssl/entropy.h b/include/mbedtls/entropy.h
similarity index 100%
rename from include/polarssl/entropy.h
rename to include/mbedtls/entropy.h
diff --git a/include/polarssl/entropy_poll.h b/include/mbedtls/entropy_poll.h
similarity index 100%
rename from include/polarssl/entropy_poll.h
rename to include/mbedtls/entropy_poll.h
diff --git a/include/polarssl/error.h b/include/mbedtls/error.h
similarity index 100%
rename from include/polarssl/error.h
rename to include/mbedtls/error.h
diff --git a/include/polarssl/gcm.h b/include/mbedtls/gcm.h
similarity index 100%
rename from include/polarssl/gcm.h
rename to include/mbedtls/gcm.h
diff --git a/include/polarssl/havege.h b/include/mbedtls/havege.h
similarity index 100%
rename from include/polarssl/havege.h
rename to include/mbedtls/havege.h
diff --git a/include/polarssl/hmac_drbg.h b/include/mbedtls/hmac_drbg.h
similarity index 100%
rename from include/polarssl/hmac_drbg.h
rename to include/mbedtls/hmac_drbg.h
diff --git a/include/polarssl/md.h b/include/mbedtls/md.h
similarity index 100%
rename from include/polarssl/md.h
rename to include/mbedtls/md.h
diff --git a/include/polarssl/md2.h b/include/mbedtls/md2.h
similarity index 100%
rename from include/polarssl/md2.h
rename to include/mbedtls/md2.h
diff --git a/include/polarssl/md4.h b/include/mbedtls/md4.h
similarity index 100%
rename from include/polarssl/md4.h
rename to include/mbedtls/md4.h
diff --git a/include/polarssl/md5.h b/include/mbedtls/md5.h
similarity index 100%
rename from include/polarssl/md5.h
rename to include/mbedtls/md5.h
diff --git a/include/polarssl/md_wrap.h b/include/mbedtls/md_wrap.h
similarity index 100%
rename from include/polarssl/md_wrap.h
rename to include/mbedtls/md_wrap.h
diff --git a/include/polarssl/memory.h b/include/mbedtls/memory.h
similarity index 100%
rename from include/polarssl/memory.h
rename to include/mbedtls/memory.h
diff --git a/include/polarssl/memory_buffer_alloc.h b/include/mbedtls/memory_buffer_alloc.h
similarity index 100%
rename from include/polarssl/memory_buffer_alloc.h
rename to include/mbedtls/memory_buffer_alloc.h
diff --git a/include/polarssl/net.h b/include/mbedtls/net.h
similarity index 100%
rename from include/polarssl/net.h
rename to include/mbedtls/net.h
diff --git a/include/polarssl/oid.h b/include/mbedtls/oid.h
similarity index 100%
rename from include/polarssl/oid.h
rename to include/mbedtls/oid.h
diff --git a/include/polarssl/padlock.h b/include/mbedtls/padlock.h
similarity index 100%
rename from include/polarssl/padlock.h
rename to include/mbedtls/padlock.h
diff --git a/include/polarssl/pbkdf2.h b/include/mbedtls/pbkdf2.h
similarity index 100%
rename from include/polarssl/pbkdf2.h
rename to include/mbedtls/pbkdf2.h
diff --git a/include/polarssl/pem.h b/include/mbedtls/pem.h
similarity index 100%
rename from include/polarssl/pem.h
rename to include/mbedtls/pem.h
diff --git a/include/polarssl/pk.h b/include/mbedtls/pk.h
similarity index 100%
rename from include/polarssl/pk.h
rename to include/mbedtls/pk.h
diff --git a/include/polarssl/pk_wrap.h b/include/mbedtls/pk_wrap.h
similarity index 100%
rename from include/polarssl/pk_wrap.h
rename to include/mbedtls/pk_wrap.h
diff --git a/include/polarssl/pkcs11.h b/include/mbedtls/pkcs11.h
similarity index 100%
rename from include/polarssl/pkcs11.h
rename to include/mbedtls/pkcs11.h
diff --git a/include/polarssl/pkcs12.h b/include/mbedtls/pkcs12.h
similarity index 100%
rename from include/polarssl/pkcs12.h
rename to include/mbedtls/pkcs12.h
diff --git a/include/polarssl/pkcs5.h b/include/mbedtls/pkcs5.h
similarity index 100%
rename from include/polarssl/pkcs5.h
rename to include/mbedtls/pkcs5.h
diff --git a/include/polarssl/platform.h b/include/mbedtls/platform.h
similarity index 100%
rename from include/polarssl/platform.h
rename to include/mbedtls/platform.h
diff --git a/include/polarssl/ripemd160.h b/include/mbedtls/ripemd160.h
similarity index 100%
rename from include/polarssl/ripemd160.h
rename to include/mbedtls/ripemd160.h
diff --git a/include/polarssl/rsa.h b/include/mbedtls/rsa.h
similarity index 100%
rename from include/polarssl/rsa.h
rename to include/mbedtls/rsa.h
diff --git a/include/polarssl/sha1.h b/include/mbedtls/sha1.h
similarity index 100%
rename from include/polarssl/sha1.h
rename to include/mbedtls/sha1.h
diff --git a/include/polarssl/sha256.h b/include/mbedtls/sha256.h
similarity index 100%
rename from include/polarssl/sha256.h
rename to include/mbedtls/sha256.h
diff --git a/include/polarssl/sha512.h b/include/mbedtls/sha512.h
similarity index 100%
rename from include/polarssl/sha512.h
rename to include/mbedtls/sha512.h
diff --git a/include/polarssl/ssl.h b/include/mbedtls/ssl.h
similarity index 100%
rename from include/polarssl/ssl.h
rename to include/mbedtls/ssl.h
diff --git a/include/polarssl/ssl_cache.h b/include/mbedtls/ssl_cache.h
similarity index 100%
rename from include/polarssl/ssl_cache.h
rename to include/mbedtls/ssl_cache.h
diff --git a/include/polarssl/ssl_ciphersuites.h b/include/mbedtls/ssl_ciphersuites.h
similarity index 100%
rename from include/polarssl/ssl_ciphersuites.h
rename to include/mbedtls/ssl_ciphersuites.h
diff --git a/include/polarssl/ssl_cookie.h b/include/mbedtls/ssl_cookie.h
similarity index 100%
rename from include/polarssl/ssl_cookie.h
rename to include/mbedtls/ssl_cookie.h
diff --git a/include/polarssl/threading.h b/include/mbedtls/threading.h
similarity index 100%
rename from include/polarssl/threading.h
rename to include/mbedtls/threading.h
diff --git a/include/polarssl/timing.h b/include/mbedtls/timing.h
similarity index 100%
rename from include/polarssl/timing.h
rename to include/mbedtls/timing.h
diff --git a/include/polarssl/version.h b/include/mbedtls/version.h
similarity index 100%
rename from include/polarssl/version.h
rename to include/mbedtls/version.h
diff --git a/include/polarssl/x509.h b/include/mbedtls/x509.h
similarity index 100%
rename from include/polarssl/x509.h
rename to include/mbedtls/x509.h
diff --git a/include/polarssl/x509_crl.h b/include/mbedtls/x509_crl.h
similarity index 100%
rename from include/polarssl/x509_crl.h
rename to include/mbedtls/x509_crl.h
diff --git a/include/polarssl/x509_crt.h b/include/mbedtls/x509_crt.h
similarity index 100%
rename from include/polarssl/x509_crt.h
rename to include/mbedtls/x509_crt.h
diff --git a/include/polarssl/x509_csr.h b/include/mbedtls/x509_csr.h
similarity index 100%
rename from include/polarssl/x509_csr.h
rename to include/mbedtls/x509_csr.h
diff --git a/include/polarssl/xtea.h b/include/mbedtls/xtea.h
similarity index 100%
rename from include/polarssl/xtea.h
rename to include/mbedtls/xtea.h
diff --git a/library/Makefile b/library/Makefile
index 25e9c4b..81a164c 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -1,5 +1,5 @@
 
-# Also see "include/polarssl/config.h"
+# Also see "include/mbedtls/config.h"
 
 # To compile on MinGW: add "-lws2_32" to LDFLAGS or define WINDOWS in your
 # environment
diff --git a/library/aes.c b/library/aes.c
index 9d96064..4567534 100644
--- a/library/aes.c
+++ b/library/aes.c
@@ -27,7 +27,7 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
@@ -36,17 +36,17 @@
 
 #include <string.h>
 
-#include "polarssl/aes.h"
+#include "mbedtls/aes.h"
 #if defined(POLARSSL_PADLOCK_C)
-#include "polarssl/padlock.h"
+#include "mbedtls/padlock.h"
 #endif
 #if defined(POLARSSL_AESNI_C)
-#include "polarssl/aesni.h"
+#include "mbedtls/aesni.h"
 #endif
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/aesni.c b/library/aesni.c
index 5315aba..a6897b2 100644
--- a/library/aesni.c
+++ b/library/aesni.c
@@ -26,14 +26,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_AESNI_C)
 
-#include "polarssl/aesni.h"
+#include "mbedtls/aesni.h"
 
 #include <string.h>
 
diff --git a/library/arc4.c b/library/arc4.c
index 309d16a..e790579 100644
--- a/library/arc4.c
+++ b/library/arc4.c
@@ -26,20 +26,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ARC4_C)
 
-#include "polarssl/arc4.h"
+#include "mbedtls/arc4.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/asn1parse.c b/library/asn1parse.c
index e4f46eb..202a6ce 100644
--- a/library/asn1parse.c
+++ b/library/asn1parse.c
@@ -21,23 +21,23 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ASN1_PARSE_C)
 
-#include "polarssl/asn1.h"
+#include "mbedtls/asn1.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_BIGNUM_C)
-#include "polarssl/bignum.h"
+#include "mbedtls/bignum.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/asn1write.c b/library/asn1write.c
index df9442e..7803867 100644
--- a/library/asn1write.c
+++ b/library/asn1write.c
@@ -21,19 +21,19 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ASN1_WRITE_C)
 
-#include "polarssl/asn1write.h"
+#include "mbedtls/asn1write.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/base64.c b/library/base64.c
index ac922a4..5af79df 100644
--- a/library/base64.c
+++ b/library/base64.c
@@ -21,14 +21,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_BASE64_C)
 
-#include "polarssl/base64.h"
+#include "mbedtls/base64.h"
 
 #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
 #include <basetsd.h>
@@ -40,7 +40,7 @@
 #if defined(POLARSSL_SELF_TEST)
 #include <string.h>
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/bignum.c b/library/bignum.c
index da70ae0..86376a4 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -28,20 +28,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_BIGNUM_C)
 
-#include "polarssl/bignum.h"
-#include "polarssl/bn_mul.h"
+#include "mbedtls/bignum.h"
+#include "mbedtls/bn_mul.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/library/blowfish.c b/library/blowfish.c
index 77191e7..76ceb86 100644
--- a/library/blowfish.c
+++ b/library/blowfish.c
@@ -27,14 +27,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_BLOWFISH_C)
 
-#include "polarssl/blowfish.h"
+#include "mbedtls/blowfish.h"
 
 #include <string.h>
 
diff --git a/library/camellia.c b/library/camellia.c
index 2a1c0c4..1aa6516 100644
--- a/library/camellia.c
+++ b/library/camellia.c
@@ -27,20 +27,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_CAMELLIA_C)
 
-#include "polarssl/camellia.h"
+#include "mbedtls/camellia.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/ccm.c b/library/ccm.c
index 87f1886..6f3db01 100644
--- a/library/ccm.c
+++ b/library/ccm.c
@@ -30,20 +30,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_CCM_C)
 
-#include "polarssl/ccm.h"
+#include "mbedtls/ccm.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_SELF_TEST) && defined(POLARSSL_AES_C)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/certs.c b/library/certs.c
index 95fc8cc..bf12f77 100644
--- a/library/certs.c
+++ b/library/certs.c
@@ -21,7 +21,7 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
diff --git a/library/cipher.c b/library/cipher.c
index 8c7452b..5334851 100644
--- a/library/cipher.c
+++ b/library/cipher.c
@@ -25,25 +25,25 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_CIPHER_C)
 
-#include "polarssl/cipher.h"
-#include "polarssl/cipher_wrap.h"
+#include "mbedtls/cipher.h"
+#include "mbedtls/cipher_wrap.h"
 
 #include <stdlib.h>
 #include <string.h>
 
 #if defined(POLARSSL_GCM_C)
-#include "polarssl/gcm.h"
+#include "mbedtls/gcm.h"
 #endif
 
 #if defined(POLARSSL_CCM_C)
-#include "polarssl/ccm.h"
+#include "mbedtls/ccm.h"
 #endif
 
 #if defined(POLARSSL_ARC4_C) || defined(POLARSSL_CIPHER_NULL_CIPHER)
diff --git a/library/cipher_wrap.c b/library/cipher_wrap.c
index 4c170bc..4478cc8 100644
--- a/library/cipher_wrap.c
+++ b/library/cipher_wrap.c
@@ -25,41 +25,41 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_CIPHER_C)
 
-#include "polarssl/cipher_wrap.h"
+#include "mbedtls/cipher_wrap.h"
 
 #if defined(POLARSSL_AES_C)
-#include "polarssl/aes.h"
+#include "mbedtls/aes.h"
 #endif
 
 #if defined(POLARSSL_ARC4_C)
-#include "polarssl/arc4.h"
+#include "mbedtls/arc4.h"
 #endif
 
 #if defined(POLARSSL_CAMELLIA_C)
-#include "polarssl/camellia.h"
+#include "mbedtls/camellia.h"
 #endif
 
 #if defined(POLARSSL_DES_C)
-#include "polarssl/des.h"
+#include "mbedtls/des.h"
 #endif
 
 #if defined(POLARSSL_BLOWFISH_C)
-#include "polarssl/blowfish.h"
+#include "mbedtls/blowfish.h"
 #endif
 
 #if defined(POLARSSL_GCM_C)
-#include "polarssl/gcm.h"
+#include "mbedtls/gcm.h"
 #endif
 
 #if defined(POLARSSL_CCM_C)
-#include "polarssl/ccm.h"
+#include "mbedtls/ccm.h"
 #endif
 
 #if defined(POLARSSL_CIPHER_NULL_CIPHER)
@@ -67,7 +67,7 @@
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/ctr_drbg.c b/library/ctr_drbg.c
index de4a6e8..2d39c7a 100644
--- a/library/ctr_drbg.c
+++ b/library/ctr_drbg.c
@@ -26,14 +26,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_CTR_DRBG_C)
 
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <string.h>
 
@@ -43,7 +43,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/debug.c b/library/debug.c
index 825cc94..bb497b8 100644
--- a/library/debug.c
+++ b/library/debug.c
@@ -21,14 +21,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_DEBUG_C)
 
-#include "polarssl/debug.h"
+#include "mbedtls/debug.h"
 
 #include <stdarg.h>
 #include <stdio.h>
@@ -45,7 +45,7 @@
 #endif /* _MSC_VER */
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #define polarssl_snprintf snprintf
 #endif
diff --git a/library/des.c b/library/des.c
index 080e113..be7348b 100644
--- a/library/des.c
+++ b/library/des.c
@@ -27,20 +27,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_DES_C)
 
-#include "polarssl/des.h"
+#include "mbedtls/des.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/dhm.c b/library/dhm.c
index 9fb7a21..b72c7f0 100644
--- a/library/dhm.c
+++ b/library/dhm.c
@@ -26,27 +26,27 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_DHM_C)
 
-#include "polarssl/dhm.h"
+#include "mbedtls/dhm.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PEM_PARSE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif
 
 #if defined(POLARSSL_ASN1_PARSE_C)
-#include "polarssl/asn1.h"
+#include "mbedtls/asn1.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #include <stdio.h>
@@ -552,7 +552,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 
-#include "polarssl/certs.h"
+#include "mbedtls/certs.h"
 
 /*
  * Checkup routine
diff --git a/library/ecdh.c b/library/ecdh.c
index 82fff27..5866c44 100644
--- a/library/ecdh.c
+++ b/library/ecdh.c
@@ -28,14 +28,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ECDH_C)
 
-#include "polarssl/ecdh.h"
+#include "mbedtls/ecdh.h"
 
 #include <string.h>
 
diff --git a/library/ecdsa.c b/library/ecdsa.c
index 3f72d85..11cf18a 100644
--- a/library/ecdsa.c
+++ b/library/ecdsa.c
@@ -27,20 +27,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ECDSA_C)
 
-#include "polarssl/ecdsa.h"
-#include "polarssl/asn1write.h"
+#include "mbedtls/ecdsa.h"
+#include "mbedtls/asn1write.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_ECDSA_DETERMINISTIC)
-#include "polarssl/hmac_drbg.h"
+#include "mbedtls/hmac_drbg.h"
 #endif
 
 #if defined(POLARSSL_ECDSA_DETERMINISTIC)
diff --git a/library/ecp.c b/library/ecp.c
index be6b0d5..63557ba 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -42,19 +42,19 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ECP_C)
 
-#include "polarssl/ecp.h"
+#include "mbedtls/ecp.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/library/ecp_curves.c b/library/ecp_curves.c
index 3786356..893bfa9 100644
--- a/library/ecp_curves.c
+++ b/library/ecp_curves.c
@@ -21,14 +21,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ECP_C)
 
-#include "polarssl/ecp.h"
+#include "mbedtls/ecp.h"
 
 #include <string.h>
 
diff --git a/library/entropy.c b/library/entropy.c
index c90c7e4..fe271d3 100644
--- a/library/entropy.c
+++ b/library/entropy.c
@@ -21,15 +21,15 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ENTROPY_C)
 
-#include "polarssl/entropy.h"
-#include "polarssl/entropy_poll.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/entropy_poll.h"
 
 #include <string.h>
 
@@ -39,7 +39,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -47,7 +47,7 @@
 #endif /* POLARSSL_SELF_TEST */
 
 #if defined(POLARSSL_HAVEGE_C)
-#include "polarssl/havege.h"
+#include "mbedtls/havege.h"
 #endif
 
 /* Implementation that should never be optimized out by the compiler */
diff --git a/library/entropy_poll.c b/library/entropy_poll.c
index 61eb3e7..e0eff16 100644
--- a/library/entropy_poll.c
+++ b/library/entropy_poll.c
@@ -21,22 +21,22 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ENTROPY_C)
 
-#include "polarssl/entropy.h"
-#include "polarssl/entropy_poll.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/entropy_poll.h"
 
 #if defined(POLARSSL_TIMING_C)
 #include <string.h>
-#include "polarssl/timing.h"
+#include "mbedtls/timing.h"
 #endif
 #if defined(POLARSSL_HAVEGE_C)
-#include "polarssl/havege.h"
+#include "mbedtls/havege.h"
 #endif
 
 #if !defined(POLARSSL_NO_PLATFORM_ENTROPY)
diff --git a/library/error.c b/library/error.c
index cb0324d..38be879 100644
--- a/library/error.c
+++ b/library/error.c
@@ -21,18 +21,18 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ERROR_C) || defined(POLARSSL_ERROR_STRERROR_DUMMY)
-#include "polarssl/error.h"
+#include "mbedtls/error.h"
 #include <string.h>
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #define polarssl_snprintf snprintf
 #endif
@@ -42,143 +42,143 @@
 #include <stdio.h>
 
 #if defined(POLARSSL_AES_C)
-#include "polarssl/aes.h"
+#include "mbedtls/aes.h"
 #endif
 
 #if defined(POLARSSL_BASE64_C)
-#include "polarssl/base64.h"
+#include "mbedtls/base64.h"
 #endif
 
 #if defined(POLARSSL_BIGNUM_C)
-#include "polarssl/bignum.h"
+#include "mbedtls/bignum.h"
 #endif
 
 #if defined(POLARSSL_BLOWFISH_C)
-#include "polarssl/blowfish.h"
+#include "mbedtls/blowfish.h"
 #endif
 
 #if defined(POLARSSL_CAMELLIA_C)
-#include "polarssl/camellia.h"
+#include "mbedtls/camellia.h"
 #endif
 
 #if defined(POLARSSL_CCM_C)
-#include "polarssl/ccm.h"
+#include "mbedtls/ccm.h"
 #endif
 
 #if defined(POLARSSL_CIPHER_C)
-#include "polarssl/cipher.h"
+#include "mbedtls/cipher.h"
 #endif
 
 #if defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/ctr_drbg.h"
 #endif
 
 #if defined(POLARSSL_DES_C)
-#include "polarssl/des.h"
+#include "mbedtls/des.h"
 #endif
 
 #if defined(POLARSSL_DHM_C)
-#include "polarssl/dhm.h"
+#include "mbedtls/dhm.h"
 #endif
 
 #if defined(POLARSSL_ECP_C)
-#include "polarssl/ecp.h"
+#include "mbedtls/ecp.h"
 #endif
 
 #if defined(POLARSSL_ENTROPY_C)
-#include "polarssl/entropy.h"
+#include "mbedtls/entropy.h"
 #endif
 
 #if defined(POLARSSL_GCM_C)
-#include "polarssl/gcm.h"
+#include "mbedtls/gcm.h"
 #endif
 
 #if defined(POLARSSL_HMAC_DRBG_C)
-#include "polarssl/hmac_drbg.h"
+#include "mbedtls/hmac_drbg.h"
 #endif
 
 #if defined(POLARSSL_MD_C)
-#include "polarssl/md.h"
+#include "mbedtls/md.h"
 #endif
 
 #if defined(POLARSSL_MD2_C)
-#include "polarssl/md2.h"
+#include "mbedtls/md2.h"
 #endif
 
 #if defined(POLARSSL_MD4_C)
-#include "polarssl/md4.h"
+#include "mbedtls/md4.h"
 #endif
 
 #if defined(POLARSSL_MD5_C)
-#include "polarssl/md5.h"
+#include "mbedtls/md5.h"
 #endif
 
 #if defined(POLARSSL_NET_C)
-#include "polarssl/net.h"
+#include "mbedtls/net.h"
 #endif
 
 #if defined(POLARSSL_OID_C)
-#include "polarssl/oid.h"
+#include "mbedtls/oid.h"
 #endif
 
 #if defined(POLARSSL_PADLOCK_C)
-#include "polarssl/padlock.h"
+#include "mbedtls/padlock.h"
 #endif
 
 #if defined(POLARSSL_PBKDF2_C)
-#include "polarssl/pbkdf2.h"
+#include "mbedtls/pbkdf2.h"
 #endif
 
 #if defined(POLARSSL_PEM_PARSE_C) || defined(POLARSSL_PEM_WRITE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif
 
 #if defined(POLARSSL_PK_C)
-#include "polarssl/pk.h"
+#include "mbedtls/pk.h"
 #endif
 
 #if defined(POLARSSL_PKCS12_C)
-#include "polarssl/pkcs12.h"
+#include "mbedtls/pkcs12.h"
 #endif
 
 #if defined(POLARSSL_PKCS5_C)
-#include "polarssl/pkcs5.h"
+#include "mbedtls/pkcs5.h"
 #endif
 
 #if defined(POLARSSL_RIPEMD160_C)
-#include "polarssl/ripemd160.h"
+#include "mbedtls/ripemd160.h"
 #endif
 
 #if defined(POLARSSL_RSA_C)
-#include "polarssl/rsa.h"
+#include "mbedtls/rsa.h"
 #endif
 
 #if defined(POLARSSL_SHA1_C)
-#include "polarssl/sha1.h"
+#include "mbedtls/sha1.h"
 #endif
 
 #if defined(POLARSSL_SHA256_C)
-#include "polarssl/sha256.h"
+#include "mbedtls/sha256.h"
 #endif
 
 #if defined(POLARSSL_SHA512_C)
-#include "polarssl/sha512.h"
+#include "mbedtls/sha512.h"
 #endif
 
 #if defined(POLARSSL_SSL_TLS_C)
-#include "polarssl/ssl.h"
+#include "mbedtls/ssl.h"
 #endif
 
 #if defined(POLARSSL_THREADING_C)
-#include "polarssl/threading.h"
+#include "mbedtls/threading.h"
 #endif
 
 #if defined(POLARSSL_X509_USE_C) || defined(POLARSSL_X509_CREATE_C)
-#include "polarssl/x509.h"
+#include "mbedtls/x509.h"
 #endif
 
 #if defined(POLARSSL_XTEA_C)
-#include "polarssl/xtea.h"
+#include "mbedtls/xtea.h"
 #endif
 
 #if defined(_MSC_VER) && !defined  snprintf && !defined(EFIX64) && \
diff --git a/library/gcm.c b/library/gcm.c
index 4e2735c..1a49180 100644
--- a/library/gcm.c
+++ b/library/gcm.c
@@ -31,24 +31,24 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_GCM_C)
 
-#include "polarssl/gcm.h"
+#include "mbedtls/gcm.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_AESNI_C)
-#include "polarssl/aesni.h"
+#include "mbedtls/aesni.h"
 #endif
 
 #if defined(POLARSSL_SELF_TEST) && defined(POLARSSL_AES_C)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/havege.c b/library/havege.c
index fe65699..d07a334 100644
--- a/library/havege.c
+++ b/library/havege.c
@@ -28,15 +28,15 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_HAVEGE_C)
 
-#include "polarssl/havege.h"
-#include "polarssl/timing.h"
+#include "mbedtls/havege.h"
+#include "mbedtls/timing.h"
 
 #include <string.h>
 
diff --git a/library/hmac_drbg.c b/library/hmac_drbg.c
index f4cac28..c3a673c 100644
--- a/library/hmac_drbg.c
+++ b/library/hmac_drbg.c
@@ -27,14 +27,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_HMAC_DRBG_C)
 
-#include "polarssl/hmac_drbg.h"
+#include "mbedtls/hmac_drbg.h"
 
 #include <string.h>
 
@@ -44,7 +44,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/md.c b/library/md.c
index fbdab91..4710d75 100644
--- a/library/md.c
+++ b/library/md.c
@@ -25,15 +25,15 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_MD_C)
 
-#include "polarssl/md.h"
-#include "polarssl/md_wrap.h"
+#include "mbedtls/md.h"
+#include "mbedtls/md_wrap.h"
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/library/md2.c b/library/md2.c
index 17569c0..a8b67f3 100644
--- a/library/md2.c
+++ b/library/md2.c
@@ -27,14 +27,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_MD2_C)
 
-#include "polarssl/md2.h"
+#include "mbedtls/md2.h"
 
 #include <string.h>
 
@@ -44,7 +44,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/md4.c b/library/md4.c
index d33cc52..e62a92d 100644
--- a/library/md4.c
+++ b/library/md4.c
@@ -27,14 +27,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_MD4_C)
 
-#include "polarssl/md4.h"
+#include "mbedtls/md4.h"
 
 #include <string.h>
 
@@ -44,7 +44,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/md5.c b/library/md5.c
index a14a9cf..4f0c5c1 100644
--- a/library/md5.c
+++ b/library/md5.c
@@ -26,14 +26,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_MD5_C)
 
-#include "polarssl/md5.h"
+#include "mbedtls/md5.h"
 
 #include <string.h>
 
@@ -43,7 +43,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/md_wrap.c b/library/md_wrap.c
index f554333..fcc3102 100644
--- a/library/md_wrap.c
+++ b/library/md_wrap.c
@@ -25,45 +25,45 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_MD_C)
 
-#include "polarssl/md_wrap.h"
+#include "mbedtls/md_wrap.h"
 
 #if defined(POLARSSL_MD2_C)
-#include "polarssl/md2.h"
+#include "mbedtls/md2.h"
 #endif
 
 #if defined(POLARSSL_MD4_C)
-#include "polarssl/md4.h"
+#include "mbedtls/md4.h"
 #endif
 
 #if defined(POLARSSL_MD5_C)
-#include "polarssl/md5.h"
+#include "mbedtls/md5.h"
 #endif
 
 #if defined(POLARSSL_RIPEMD160_C)
-#include "polarssl/ripemd160.h"
+#include "mbedtls/ripemd160.h"
 #endif
 
 #if defined(POLARSSL_SHA1_C)
-#include "polarssl/sha1.h"
+#include "mbedtls/sha1.h"
 #endif
 
 #if defined(POLARSSL_SHA256_C)
-#include "polarssl/sha256.h"
+#include "mbedtls/sha256.h"
 #endif
 
 #if defined(POLARSSL_SHA512_C)
-#include "polarssl/sha512.h"
+#include "mbedtls/sha512.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/memory_buffer_alloc.c b/library/memory_buffer_alloc.c
index 5eb8ab1..1d7750a 100644
--- a/library/memory_buffer_alloc.c
+++ b/library/memory_buffer_alloc.c
@@ -21,17 +21,17 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
-#include "polarssl/memory_buffer_alloc.h"
+#include "mbedtls/memory_buffer_alloc.h"
 
 /* No need for the header guard as POLARSSL_MEMORY_BUFFER_ALLOC_C
    is dependent upon POLARSSL_PLATFORM_C */
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 
 #include <string.h>
 
@@ -40,7 +40,7 @@
 #endif
 
 #if defined(POLARSSL_THREADING_C)
-#include "polarssl/threading.h"
+#include "mbedtls/threading.h"
 #endif
 
 /* Implementation that should never be optimized out by the compiler */
diff --git a/library/net.c b/library/net.c
index 68c9e5e..2d49463 100644
--- a/library/net.c
+++ b/library/net.c
@@ -21,14 +21,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_NET_C)
 
-#include "polarssl/net.h"
+#include "mbedtls/net.h"
 
 #include <string.h>
 
@@ -130,7 +130,7 @@
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #define polarssl_snprintf snprintf
 #endif
diff --git a/library/oid.c b/library/oid.c
index ad45a3d..2979d6a 100644
--- a/library/oid.c
+++ b/library/oid.c
@@ -23,27 +23,27 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_OID_C)
 
-#include "polarssl/oid.h"
-#include "polarssl/rsa.h"
+#include "mbedtls/oid.h"
+#include "mbedtls/rsa.h"
 
 #include <stdio.h>
 #include <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #define polarssl_snprintf snprintf
 #endif
 
 #if defined(POLARSSL_X509_USE_C) || defined(POLARSSL_X509_CREATE_C)
-#include "polarssl/x509.h"
+#include "mbedtls/x509.h"
 #endif
 
 /*
diff --git a/library/padlock.c b/library/padlock.c
index f4d95fd..eff5365 100644
--- a/library/padlock.c
+++ b/library/padlock.c
@@ -27,14 +27,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PADLOCK_C)
 
-#include "polarssl/padlock.h"
+#include "mbedtls/padlock.h"
 
 #include <string.h>
 
diff --git a/library/pbkdf2.c b/library/pbkdf2.c
index 54494ab..863d016 100644
--- a/library/pbkdf2.c
+++ b/library/pbkdf2.c
@@ -32,15 +32,15 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PBKDF2_C)
 
-#include "polarssl/pbkdf2.h"
-#include "polarssl/pkcs5.h"
+#include "mbedtls/pbkdf2.h"
+#include "mbedtls/pkcs5.h"
 
 int pbkdf2_hmac( md_context_t *ctx, const unsigned char *password, size_t plen,
                  const unsigned char *salt, size_t slen,
diff --git a/library/pem.c b/library/pem.c
index 68be8fd..c722282 100644
--- a/library/pem.c
+++ b/library/pem.c
@@ -21,24 +21,24 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PEM_PARSE_C) || defined(POLARSSL_PEM_WRITE_C)
 
-#include "polarssl/pem.h"
-#include "polarssl/base64.h"
-#include "polarssl/des.h"
-#include "polarssl/aes.h"
-#include "polarssl/md5.h"
-#include "polarssl/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 <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/pk.c b/library/pk.c
index 4d78b57..7652510 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -21,23 +21,23 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PK_C)
-#include "polarssl/pk.h"
-#include "polarssl/pk_wrap.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/pk_wrap.h"
 
 #if defined(POLARSSL_RSA_C)
-#include "polarssl/rsa.h"
+#include "mbedtls/rsa.h"
 #endif
 #if defined(POLARSSL_ECP_C)
-#include "polarssl/ecp.h"
+#include "mbedtls/ecp.h"
 #endif
 #if defined(POLARSSL_ECDSA_C)
-#include "polarssl/ecdsa.h"
+#include "mbedtls/ecdsa.h"
 #endif
 
 /* Implementation that should never be optimized out by the compiler */
diff --git a/library/pk_wrap.c b/library/pk_wrap.c
index 6068605..66afa7c 100644
--- a/library/pk_wrap.c
+++ b/library/pk_wrap.c
@@ -21,29 +21,29 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PK_C)
-#include "polarssl/pk_wrap.h"
+#include "mbedtls/pk_wrap.h"
 
 /* Even if RSA not activated, for the sake of RSA-alt */
-#include "polarssl/rsa.h"
+#include "mbedtls/rsa.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_ECP_C)
-#include "polarssl/ecp.h"
+#include "mbedtls/ecp.h"
 #endif
 
 #if defined(POLARSSL_ECDSA_C)
-#include "polarssl/ecdsa.h"
+#include "mbedtls/ecdsa.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/pkcs11.c b/library/pkcs11.c
index 14cde31..3943541 100644
--- a/library/pkcs11.c
+++ b/library/pkcs11.c
@@ -24,16 +24,16 @@
  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "polarssl/pkcs11.h"
+#include "mbedtls/pkcs11.h"
 
 #if defined(POLARSSL_PKCS11_C)
 
-#include "polarssl/md.h"
-#include "polarssl/oid.h"
-#include "polarssl/x509_crt.h"
+#include "mbedtls/md.h"
+#include "mbedtls/oid.h"
+#include "mbedtls/x509_crt.h"
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/pkcs12.c b/library/pkcs12.c
index f84fd52..66b29c1 100644
--- a/library/pkcs12.c
+++ b/library/pkcs12.c
@@ -27,25 +27,25 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PKCS12_C)
 
-#include "polarssl/pkcs12.h"
-#include "polarssl/asn1.h"
-#include "polarssl/cipher.h"
+#include "mbedtls/pkcs12.h"
+#include "mbedtls/asn1.h"
+#include "mbedtls/cipher.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_ARC4_C)
-#include "polarssl/arc4.h"
+#include "mbedtls/arc4.h"
 #endif
 
 #if defined(POLARSSL_DES_C)
-#include "polarssl/des.h"
+#include "mbedtls/des.h"
 #endif
 
 /* Implementation that should never be optimized out by the compiler */
diff --git a/library/pkcs5.c b/library/pkcs5.c
index 2e7d816..dae5e41 100644
--- a/library/pkcs5.c
+++ b/library/pkcs5.c
@@ -31,22 +31,22 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PKCS5_C)
 
-#include "polarssl/pkcs5.h"
-#include "polarssl/asn1.h"
-#include "polarssl/cipher.h"
-#include "polarssl/oid.h"
+#include "mbedtls/pkcs5.h"
+#include "mbedtls/asn1.h"
+#include "mbedtls/cipher.h"
+#include "mbedtls/oid.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/pkparse.c b/library/pkparse.c
index 06fb292..1529a93 100644
--- a/library/pkparse.c
+++ b/library/pkparse.c
@@ -21,40 +21,40 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PK_PARSE_C)
 
-#include "polarssl/pk.h"
-#include "polarssl/asn1.h"
-#include "polarssl/oid.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/asn1.h"
+#include "mbedtls/oid.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_RSA_C)
-#include "polarssl/rsa.h"
+#include "mbedtls/rsa.h"
 #endif
 #if defined(POLARSSL_ECP_C)
-#include "polarssl/ecp.h"
+#include "mbedtls/ecp.h"
 #endif
 #if defined(POLARSSL_ECDSA_C)
-#include "polarssl/ecdsa.h"
+#include "mbedtls/ecdsa.h"
 #endif
 #if defined(POLARSSL_PEM_PARSE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif
 #if defined(POLARSSL_PKCS5_C)
-#include "polarssl/pkcs5.h"
+#include "mbedtls/pkcs5.h"
 #endif
 #if defined(POLARSSL_PKCS12_C)
-#include "polarssl/pkcs12.h"
+#include "mbedtls/pkcs12.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/pkwrite.c b/library/pkwrite.c
index 35dbd0b..2c08b92 100644
--- a/library/pkwrite.c
+++ b/library/pkwrite.c
@@ -21,34 +21,34 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PK_WRITE_C)
 
-#include "polarssl/pk.h"
-#include "polarssl/asn1write.h"
-#include "polarssl/oid.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/asn1write.h"
+#include "mbedtls/oid.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_RSA_C)
-#include "polarssl/rsa.h"
+#include "mbedtls/rsa.h"
 #endif
 #if defined(POLARSSL_ECP_C)
-#include "polarssl/ecp.h"
+#include "mbedtls/ecp.h"
 #endif
 #if defined(POLARSSL_ECDSA_C)
-#include "polarssl/ecdsa.h"
+#include "mbedtls/ecdsa.h"
 #endif
 #if defined(POLARSSL_PEM_WRITE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/platform.c b/library/platform.c
index a161bc3..fb6805f 100644
--- a/library/platform.c
+++ b/library/platform.c
@@ -21,14 +21,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
 
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 
 #if defined(POLARSSL_PLATFORM_MEMORY)
 #if !defined(POLARSSL_PLATFORM_STD_MALLOC)
diff --git a/library/ripemd160.c b/library/ripemd160.c
index 2c196f4..0ca354c 100644
--- a/library/ripemd160.c
+++ b/library/ripemd160.c
@@ -27,14 +27,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_RIPEMD160_C)
 
-#include "polarssl/ripemd160.h"
+#include "mbedtls/ripemd160.h"
 
 #include <string.h>
 
@@ -44,7 +44,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/rsa.c b/library/rsa.c
index 0d71ad0..e915e4f 100644
--- a/library/rsa.c
+++ b/library/rsa.c
@@ -27,20 +27,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_RSA_C)
 
-#include "polarssl/rsa.h"
-#include "polarssl/oid.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/oid.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PKCS1_V21)
-#include "polarssl/md.h"
+#include "mbedtls/md.h"
 #endif
 
 #if defined(POLARSSL_PKCS1_V15) && !defined(__OpenBSD__)
@@ -48,7 +48,7 @@
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
@@ -1471,7 +1471,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 
-#include "polarssl/sha1.h"
+#include "mbedtls/sha1.h"
 
 /*
  * Example RSA-1024 keypair, for test purposes
diff --git a/library/sha1.c b/library/sha1.c
index 35e0625..53f5f26 100644
--- a/library/sha1.c
+++ b/library/sha1.c
@@ -26,14 +26,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SHA1_C)
 
-#include "polarssl/sha1.h"
+#include "mbedtls/sha1.h"
 
 #include <string.h>
 
@@ -43,7 +43,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/sha256.c b/library/sha256.c
index b9b3f09..1b2d4b2 100644
--- a/library/sha256.c
+++ b/library/sha256.c
@@ -26,14 +26,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SHA256_C)
 
-#include "polarssl/sha256.h"
+#include "mbedtls/sha256.h"
 
 #include <string.h>
 
@@ -43,7 +43,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/sha512.c b/library/sha512.c
index 629ed1b..1ef088f 100644
--- a/library/sha512.c
+++ b/library/sha512.c
@@ -26,14 +26,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SHA512_C)
 
-#include "polarssl/sha512.h"
+#include "mbedtls/sha512.h"
 
 #if defined(_MSC_VER) || defined(__WATCOMC__)
   #define UL64(x) x##ui64
@@ -49,7 +49,7 @@
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/library/ssl_cache.c b/library/ssl_cache.c
index 0c2df29..eaf67e8 100644
--- a/library/ssl_cache.c
+++ b/library/ssl_cache.c
@@ -25,19 +25,19 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SSL_CACHE_C)
 
-#include "polarssl/ssl_cache.h"
+#include "mbedtls/ssl_cache.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/ssl_ciphersuites.c b/library/ssl_ciphersuites.c
index 694bcf0..11c46a5 100644
--- a/library/ssl_ciphersuites.c
+++ b/library/ssl_ciphersuites.c
@@ -23,15 +23,15 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SSL_TLS_C)
 
-#include "polarssl/ssl_ciphersuites.h"
-#include "polarssl/ssl.h"
+#include "mbedtls/ssl_ciphersuites.h"
+#include "mbedtls/ssl.h"
 
 // #include <stdlib.h>
 #include <string.h>
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index 9561872..bdb5522 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -21,20 +21,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SSL_CLI_C)
 
-#include "polarssl/debug.h"
-#include "polarssl/ssl.h"
+#include "mbedtls/debug.h"
+#include "mbedtls/ssl.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/ssl_cookie.c b/library/ssl_cookie.c
index 4f8ad68..c2fde82 100644
--- a/library/ssl_cookie.c
+++ b/library/ssl_cookie.c
@@ -25,17 +25,17 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SSL_COOKIE_C)
 
-#include "polarssl/ssl_cookie.h"
+#include "mbedtls/ssl_cookie.h"
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #define polarssl_malloc     malloc
 #define polarssl_free       free
diff --git a/library/ssl_srv.c b/library/ssl_srv.c
index ebae272..cc3ee3e 100644
--- a/library/ssl_srv.c
+++ b/library/ssl_srv.c
@@ -21,24 +21,24 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SSL_SRV_C)
 
-#include "polarssl/debug.h"
-#include "polarssl/ssl.h"
+#include "mbedtls/debug.h"
+#include "mbedtls/ssl.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_ECP_C)
-#include "polarssl/ecp.h"
+#include "mbedtls/ecp.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index d474ccd..e9baa8f 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -29,25 +29,25 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SSL_TLS_C)
 
-#include "polarssl/debug.h"
-#include "polarssl/ssl.h"
+#include "mbedtls/debug.h"
+#include "mbedtls/ssl.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_X509_CRT_PARSE_C) && \
     defined(POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE)
-#include "polarssl/oid.h"
+#include "mbedtls/oid.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_malloc     malloc
diff --git a/library/threading.c b/library/threading.c
index 5d48516..b383efe 100644
--- a/library/threading.c
+++ b/library/threading.c
@@ -21,14 +21,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_THREADING_C)
 
-#include "polarssl/threading.h"
+#include "mbedtls/threading.h"
 
 #if defined(POLARSSL_THREADING_PTHREAD)
 static int threading_mutex_init_pthread( threading_mutex_t *mutex )
diff --git a/library/timing.c b/library/timing.c
index 5d58f52..751b0b4 100644
--- a/library/timing.c
+++ b/library/timing.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_SELF_TEST) && defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -35,7 +35,7 @@
 
 #if defined(POLARSSL_TIMING_C) && !defined(POLARSSL_TIMING_ALT)
 
-#include "polarssl/timing.h"
+#include "mbedtls/timing.h"
 
 #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
 
@@ -337,7 +337,7 @@
 
 /* To test net_usleep against our functions */
 #if defined(POLARSSL_NET_C) && defined(POLARSSL_HAVE_TIME)
-#include "polarssl/net.h"
+#include "mbedtls/net.h"
 #endif
 
 /*
diff --git a/library/version.c b/library/version.c
index 2856d6c..c3af429 100644
--- a/library/version.c
+++ b/library/version.c
@@ -21,14 +21,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_VERSION_C)
 
-#include "polarssl/version.h"
+#include "mbedtls/version.h"
 #include <string.h>
 
 unsigned int version_get_number()
diff --git a/library/version_features.c b/library/version_features.c
index fcda595..ebcda4c 100644
--- a/library/version_features.c
+++ b/library/version_features.c
@@ -21,14 +21,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_VERSION_C)
 
-#include "polarssl/version.h"
+#include "mbedtls/version.h"
 
 #include <string.h>
 
diff --git a/library/x509.c b/library/x509.c
index b35663d..c1fd8ad 100644
--- a/library/x509.c
+++ b/library/x509.c
@@ -31,26 +31,26 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_X509_USE_C)
 
-#include "polarssl/x509.h"
-#include "polarssl/asn1.h"
-#include "polarssl/oid.h"
+#include "mbedtls/x509.h"
+#include "mbedtls/asn1.h"
+#include "mbedtls/oid.h"
 
 #include <stdio.h>
 #include <string.h>
 
 #if defined(POLARSSL_PEM_PARSE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #include <stdlib.h>
@@ -1009,8 +1009,8 @@
 
 #if defined(POLARSSL_SELF_TEST)
 
-#include "polarssl/x509_crt.h"
-#include "polarssl/certs.h"
+#include "mbedtls/x509_crt.h"
+#include "mbedtls/certs.h"
 
 /*
  * Checkup routine
diff --git a/library/x509_create.c b/library/x509_create.c
index f505bab..5318cd3 100644
--- a/library/x509_create.c
+++ b/library/x509_create.c
@@ -21,16 +21,16 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_X509_CREATE_C)
 
-#include "polarssl/x509.h"
-#include "polarssl/asn1write.h"
-#include "polarssl/oid.h"
+#include "mbedtls/x509.h"
+#include "mbedtls/asn1write.h"
+#include "mbedtls/oid.h"
 
 #include <string.h>
 
diff --git a/library/x509_crl.c b/library/x509_crl.c
index e2076a6..afba7b2 100644
--- a/library/x509_crl.c
+++ b/library/x509_crl.c
@@ -31,24 +31,24 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_X509_CRL_PARSE_C)
 
-#include "polarssl/x509_crl.h"
-#include "polarssl/oid.h"
+#include "mbedtls/x509_crl.h"
+#include "mbedtls/oid.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PEM_PARSE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 77008ed..84e4415 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -31,25 +31,25 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_X509_CRT_PARSE_C)
 
-#include "polarssl/x509_crt.h"
-#include "polarssl/oid.h"
+#include "mbedtls/x509_crt.h"
+#include "mbedtls/oid.h"
 
 #include <stdio.h>
 #include <string.h>
 
 #if defined(POLARSSL_PEM_PARSE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #define polarssl_free       free
@@ -58,7 +58,7 @@
 #endif
 
 #if defined(POLARSSL_THREADING_C)
-#include "polarssl/threading.h"
+#include "mbedtls/threading.h"
 #endif
 
 #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
diff --git a/library/x509_csr.c b/library/x509_csr.c
index 558b078..e62417e 100644
--- a/library/x509_csr.c
+++ b/library/x509_csr.c
@@ -31,24 +31,24 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_X509_CSR_PARSE_C)
 
-#include "polarssl/x509_csr.h"
-#include "polarssl/oid.h"
+#include "mbedtls/x509_csr.h"
+#include "mbedtls/oid.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PEM_PARSE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/library/x509write_crt.c b/library/x509write_crt.c
index 80913ec..89a2988 100644
--- a/library/x509write_crt.c
+++ b/library/x509write_crt.c
@@ -27,22 +27,22 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_X509_CRT_WRITE_C)
 
-#include "polarssl/x509_crt.h"
-#include "polarssl/oid.h"
-#include "polarssl/asn1write.h"
-#include "polarssl/sha1.h"
+#include "mbedtls/x509_crt.h"
+#include "mbedtls/oid.h"
+#include "mbedtls/asn1write.h"
+#include "mbedtls/sha1.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_PEM_WRITE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif /* POLARSSL_PEM_WRITE_C */
 
 /* Implementation that should never be optimized out by the compiler */
diff --git a/library/x509write_csr.c b/library/x509write_csr.c
index c5a5875..6c112e6 100644
--- a/library/x509write_csr.c
+++ b/library/x509write_csr.c
@@ -26,22 +26,22 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_X509_CSR_WRITE_C)
 
-#include "polarssl/x509_csr.h"
-#include "polarssl/oid.h"
-#include "polarssl/asn1write.h"
+#include "mbedtls/x509_csr.h"
+#include "mbedtls/oid.h"
+#include "mbedtls/asn1write.h"
 
 #include <string.h>
 #include <stdlib.h>
 
 #if defined(POLARSSL_PEM_WRITE_C)
-#include "polarssl/pem.h"
+#include "mbedtls/pem.h"
 #endif
 
 /* Implementation that should never be optimized out by the compiler */
diff --git a/library/xtea.c b/library/xtea.c
index 0558b93..8fac8c1 100644
--- a/library/xtea.c
+++ b/library/xtea.c
@@ -21,20 +21,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_XTEA_C)
 
-#include "polarssl/xtea.h"
+#include "mbedtls/xtea.h"
 
 #include <string.h>
 
 #if defined(POLARSSL_SELF_TEST)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
diff --git a/programs/aes/aescrypt2.c b/programs/aes/aescrypt2.c
index 2582b96..5d733b4 100644
--- a/programs/aes/aescrypt2.c
+++ b/programs/aes/aescrypt2.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -36,8 +36,8 @@
 
 #if defined(POLARSSL_AES_C) && defined(POLARSSL_SHA256_C) && \
  defined(POLARSSL_FS_IO)
-#include "polarssl/aes.h"
-#include "polarssl/sha256.h"
+#include "mbedtls/aes.h"
+#include "mbedtls/sha256.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/aes/crypt_and_hash.c b/programs/aes/crypt_and_hash.c
index 1f14d3f..b002934 100644
--- a/programs/aes/crypt_and_hash.c
+++ b/programs/aes/crypt_and_hash.c
@@ -22,13 +22,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -37,8 +37,8 @@
 
 #if defined(POLARSSL_CIPHER_C) && defined(POLARSSL_MD_C) && \
  defined(POLARSSL_FS_IO)
-#include "polarssl/cipher.h"
-#include "polarssl/md.h"
+#include "mbedtls/cipher.h"
+#include "mbedtls/md.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/hash/generic_sum.c b/programs/hash/generic_sum.c
index 08f175d..888f0f9 100644
--- a/programs/hash/generic_sum.c
+++ b/programs/hash/generic_sum.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -35,7 +35,7 @@
 #endif
 
 #if defined(POLARSSL_MD_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/md.h"
+#include "mbedtls/md.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/hash/hello.c b/programs/hash/hello.c
index 77ae7f9..be81d56 100644
--- a/programs/hash/hello.c
+++ b/programs/hash/hello.c
@@ -21,20 +21,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
 #endif
 
 #if defined(POLARSSL_MD5_C)
-#include "polarssl/md5.h"
+#include "mbedtls/md5.h"
 #endif
 
 #if !defined(POLARSSL_MD5_C)
diff --git a/programs/hash/md5sum.c b/programs/hash/md5sum.c
index f8e32f7..0ac0b0c 100644
--- a/programs/hash/md5sum.c
+++ b/programs/hash/md5sum.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -35,7 +35,7 @@
 #endif
 
 #if defined(POLARSSL_MD5_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/md5.h"
+#include "mbedtls/md5.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/hash/sha1sum.c b/programs/hash/sha1sum.c
index dbdce3e..a6f9673 100644
--- a/programs/hash/sha1sum.c
+++ b/programs/hash/sha1sum.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -35,7 +35,7 @@
 #endif
 
 #if defined(POLARSSL_SHA1_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/sha1.h"
+#include "mbedtls/sha1.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/hash/sha2sum.c b/programs/hash/sha2sum.c
index 2ed92fc..453ea5d 100644
--- a/programs/hash/sha2sum.c
+++ b/programs/hash/sha2sum.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -35,7 +35,7 @@
 #endif
 
 #if defined(POLARSSL_SHA256_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/sha256.h"
+#include "mbedtls/sha256.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/dh_client.c b/programs/pkey/dh_client.c
index ef88958..8ff4e5c 100644
--- a/programs/pkey/dh_client.c
+++ b/programs/pkey/dh_client.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -37,13 +37,13 @@
     defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_NET_C) && \
     defined(POLARSSL_RSA_C) && defined(POLARSSL_SHA256_C) && \
     defined(POLARSSL_FS_IO) && defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/net.h"
-#include "polarssl/aes.h"
-#include "polarssl/dhm.h"
-#include "polarssl/rsa.h"
-#include "polarssl/sha1.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/net.h"
+#include "mbedtls/aes.h"
+#include "mbedtls/dhm.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/sha1.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/dh_genprime.c b/programs/pkey/dh_genprime.c
index b5f9018..c2f5b6c 100644
--- a/programs/pkey/dh_genprime.c
+++ b/programs/pkey/dh_genprime.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -36,9 +36,9 @@
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_ENTROPY_C) && \
     defined(POLARSSL_FS_IO) && defined(POLARSSL_CTR_DRBG_C) && \
     defined(POLARSSL_GENPRIME)
-#include "polarssl/bignum.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/bignum.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/dh_server.c b/programs/pkey/dh_server.c
index d0bc1c6..524e8d6 100644
--- a/programs/pkey/dh_server.c
+++ b/programs/pkey/dh_server.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -37,13 +37,13 @@
     defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_NET_C) && \
     defined(POLARSSL_RSA_C) && defined(POLARSSL_SHA256_C) && \
     defined(POLARSSL_FS_IO) && defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/net.h"
-#include "polarssl/aes.h"
-#include "polarssl/dhm.h"
-#include "polarssl/rsa.h"
-#include "polarssl/sha1.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/net.h"
+#include "mbedtls/aes.h"
+#include "mbedtls/dhm.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/sha1.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/ecdsa.c b/programs/pkey/ecdsa.c
index aa8eafb..3d74978 100644
--- a/programs/pkey/ecdsa.c
+++ b/programs/pkey/ecdsa.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -35,9 +35,9 @@
 
 #if defined(POLARSSL_ECDSA_C) && \
     defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/ecdsa.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/ecdsa.h"
 
 #include <string.h>
 #endif
diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c
index fca35e5..6b93111 100644
--- a/programs/pkey/gen_key.c
+++ b/programs/pkey/gen_key.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -35,13 +35,13 @@
 
 #if defined(POLARSSL_PK_WRITE_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/error.h"
-#include "polarssl/pk.h"
-#include "polarssl/ecdsa.h"
-#include "polarssl/rsa.h"
-#include "polarssl/error.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/error.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/ecdsa.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/error.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/pkey/key_app.c b/programs/pkey/key_app.c
index f8a2d2d..c72f17d 100644
--- a/programs/pkey/key_app.c
+++ b/programs/pkey/key_app.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -35,9 +35,9 @@
 
 #if defined(POLARSSL_BIGNUM_C) && \
     defined(POLARSSL_PK_PARSE_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/error.h"
-#include "polarssl/rsa.h"
-#include "polarssl/x509.h"
+#include "mbedtls/error.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/x509.h"
 
 #include <string.h>
 #endif
diff --git a/programs/pkey/key_app_writer.c b/programs/pkey/key_app_writer.c
index 3be1ce0..1be0dd3 100644
--- a/programs/pkey/key_app_writer.c
+++ b/programs/pkey/key_app_writer.c
@@ -21,22 +21,22 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
 #endif
 
 #if defined(POLARSSL_PK_WRITE_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/error.h"
-#include "polarssl/pk.h"
-#include "polarssl/error.h"
+#include "mbedtls/error.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/error.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/mpi_demo.c b/programs/pkey/mpi_demo.c
index c94fb97..9f013a1 100644
--- a/programs/pkey/mpi_demo.c
+++ b/programs/pkey/mpi_demo.c
@@ -21,20 +21,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
 #endif
 
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/bignum.h"
+#include "mbedtls/bignum.h"
 
 #include <stdio.h>
 #endif
diff --git a/programs/pkey/pk_decrypt.c b/programs/pkey/pk_decrypt.c
index bafa4a9..a212351 100644
--- a/programs/pkey/pk_decrypt.c
+++ b/programs/pkey/pk_decrypt.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -36,10 +36,10 @@
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_PK_PARSE_C) && \
     defined(POLARSSL_FS_IO) && defined(POLARSSL_ENTROPY_C) && \
     defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/error.h"
-#include "polarssl/pk.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/error.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/pk_encrypt.c b/programs/pkey/pk_encrypt.c
index ad94159..13fa484 100644
--- a/programs/pkey/pk_encrypt.c
+++ b/programs/pkey/pk_encrypt.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -37,10 +37,10 @@
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_PK_PARSE_C) && \
     defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/error.h"
-#include "polarssl/pk.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/error.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/pk_sign.c b/programs/pkey/pk_sign.c
index 7ccc70b..4b2a568 100644
--- a/programs/pkey/pk_sign.c
+++ b/programs/pkey/pk_sign.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_snprintf   snprintf
@@ -39,12 +39,12 @@
     defined(POLARSSL_SHA256_C) && \
     defined(POLARSSL_PK_PARSE_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/error.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/md.h"
-#include "polarssl/pk.h"
-#include "polarssl/sha1.h"
+#include "mbedtls/error.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/md.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/sha1.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/pk_verify.c b/programs/pkey/pk_verify.c
index 3afa34a..a9c6645 100644
--- a/programs/pkey/pk_verify.c
+++ b/programs/pkey/pk_verify.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_snprintf   snprintf
@@ -38,10 +38,10 @@
 #if defined(POLARSSL_BIGNUM_C) && \
     defined(POLARSSL_SHA256_C) && defined(POLARSSL_PK_PARSE_C) && \
     defined(POLARSSL_FS_IO)
-#include "polarssl/error.h"
-#include "polarssl/md.h"
-#include "polarssl/pk.h"
-#include "polarssl/sha1.h"
+#include "mbedtls/error.h"
+#include "mbedtls/md.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/sha1.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/rsa_decrypt.c b/programs/pkey/rsa_decrypt.c
index dfa475c..215c3bc 100644
--- a/programs/pkey/rsa_decrypt.c
+++ b/programs/pkey/rsa_decrypt.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -36,9 +36,9 @@
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_FS_IO) && defined(POLARSSL_ENTROPY_C) && \
     defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/rsa.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/rsa_encrypt.c b/programs/pkey/rsa_encrypt.c
index 6831833..b3d23bb 100644
--- a/programs/pkey/rsa_encrypt.c
+++ b/programs/pkey/rsa_encrypt.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -37,9 +37,9 @@
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/rsa.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/rsa_genkey.c b/programs/pkey/rsa_genkey.c
index 0270b53..d5f1cf5 100644
--- a/programs/pkey/rsa_genkey.c
+++ b/programs/pkey/rsa_genkey.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -36,11 +36,11 @@
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_ENTROPY_C) && \
     defined(POLARSSL_RSA_C) && defined(POLARSSL_GENPRIME) && \
     defined(POLARSSL_FS_IO) && defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/bignum.h"
-#include "polarssl/x509.h"
-#include "polarssl/rsa.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/bignum.h"
+#include "mbedtls/x509.h"
+#include "mbedtls/rsa.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/rsa_sign.c b/programs/pkey/rsa_sign.c
index d9a9a6e..69c7374 100644
--- a/programs/pkey/rsa_sign.c
+++ b/programs/pkey/rsa_sign.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -36,8 +36,8 @@
 
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_SHA256_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/rsa.h"
-#include "polarssl/sha1.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/sha1.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/rsa_sign_pss.c b/programs/pkey/rsa_sign_pss.c
index 7c0c7ca..0750975 100644
--- a/programs/pkey/rsa_sign_pss.c
+++ b/programs/pkey/rsa_sign_pss.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_snprintf   snprintf
@@ -39,12 +39,12 @@
     defined(POLARSSL_RSA_C) && defined(POLARSSL_SHA256_C) && \
     defined(POLARSSL_PK_PARSE_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/md.h"
-#include "polarssl/rsa.h"
-#include "polarssl/sha1.h"
-#include "polarssl/x509.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/md.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/sha1.h"
+#include "mbedtls/x509.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/rsa_verify.c b/programs/pkey/rsa_verify.c
index 374a5f1..5121afe 100644
--- a/programs/pkey/rsa_verify.c
+++ b/programs/pkey/rsa_verify.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -35,8 +35,8 @@
 
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_SHA256_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/rsa.h"
-#include "polarssl/sha1.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/sha1.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/pkey/rsa_verify_pss.c b/programs/pkey/rsa_verify_pss.c
index 217b713..50a0c06 100644
--- a/programs/pkey/rsa_verify_pss.c
+++ b/programs/pkey/rsa_verify_pss.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_snprintf   snprintf
@@ -38,11 +38,11 @@
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_SHA256_C) && defined(POLARSSL_PK_PARSE_C) && \
     defined(POLARSSL_FS_IO)
-#include "polarssl/md.h"
-#include "polarssl/pem.h"
-#include "polarssl/pk.h"
-#include "polarssl/sha1.h"
-#include "polarssl/x509.h"
+#include "mbedtls/md.h"
+#include "mbedtls/pem.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/sha1.h"
+#include "mbedtls/x509.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/random/gen_entropy.c b/programs/random/gen_entropy.c
index 573a13b..b2a04d9 100644
--- a/programs/random/gen_entropy.c
+++ b/programs/random/gen_entropy.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -35,7 +35,7 @@
 #endif
 
 #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/entropy.h"
+#include "mbedtls/entropy.h"
 
 #include <stdio.h>
 #endif
diff --git a/programs/random/gen_random_ctr_drbg.c b/programs/random/gen_random_ctr_drbg.c
index e96e37b..31b93bd 100644
--- a/programs/random/gen_random_ctr_drbg.c
+++ b/programs/random/gen_random_ctr_drbg.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -36,8 +36,8 @@
 
 #if defined(POLARSSL_CTR_DRBG_C) && defined(POLARSSL_ENTROPY_C) && \
  defined(POLARSSL_FS_IO)
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <stdio.h>
 #endif
diff --git a/programs/random/gen_random_havege.c b/programs/random/gen_random_havege.c
index e5a5356..20588ce 100644
--- a/programs/random/gen_random_havege.c
+++ b/programs/random/gen_random_havege.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -35,7 +35,7 @@
 #endif
 
 #if defined(POLARSSL_HAVEGE_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/havege.h"
+#include "mbedtls/havege.h"
 
 #include <stdio.h>
 #include <time.h>
diff --git a/programs/ssl/dtls_client.c b/programs/ssl/dtls_client.c
index b7580c7..4a19618 100644
--- a/programs/ssl/dtls_client.c
+++ b/programs/ssl/dtls_client.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #define polarssl_printf     printf
 #define polarssl_fprintf    fprintf
@@ -57,13 +57,13 @@
 #include <string.h>
 #include <stdio.h>
 
-#include "polarssl/net.h"
-#include "polarssl/debug.h"
-#include "polarssl/ssl.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/error.h"
-#include "polarssl/certs.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"
 
 #define SERVER_PORT 4433
 #define SERVER_NAME "localhost"
diff --git a/programs/ssl/dtls_server.c b/programs/ssl/dtls_server.c
index 48b6c92..46c2a33 100644
--- a/programs/ssl/dtls_server.c
+++ b/programs/ssl/dtls_server.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #define polarssl_printf     printf
 #define polarssl_fprintf    fprintf
@@ -59,18 +59,18 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/certs.h"
-#include "polarssl/x509.h"
-#include "polarssl/ssl.h"
-#include "polarssl/ssl_cookie.h"
-#include "polarssl/net.h"
-#include "polarssl/error.h"
-#include "polarssl/debug.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"
 
 #if defined(POLARSSL_SSL_CACHE_C)
-#include "polarssl/ssl_cache.h"
+#include "mbedtls/ssl_cache.h"
 #endif
 
 #define READ_TIMEOUT_MS 10000   /* 5 seconds */
diff --git a/programs/ssl/mini_client.c b/programs/ssl/mini_client.c
index c48969b..de4fb32 100644
--- a/programs/ssl/mini_client.c
+++ b/programs/ssl/mini_client.c
@@ -22,7 +22,7 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
@@ -41,7 +41,7 @@
     !defined(POLARSSL_NET_C) || !defined(POLARSSL_SSL_CLI_C) || \
     !defined(UNIX)
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf printf
@@ -57,10 +57,10 @@
 
 #include <string.h>
 
-#include "polarssl/net.h"
-#include "polarssl/ssl.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/net.h"
+#include "mbedtls/ssl.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 
 #include <sys/socket.h>
 #include <netinet/in.h>
diff --git a/programs/ssl/ssl_client1.c b/programs/ssl/ssl_client1.c
index b0a75dc..dfd5067 100644
--- a/programs/ssl/ssl_client1.c
+++ b/programs/ssl/ssl_client1.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -38,13 +38,13 @@
     defined(POLARSSL_SSL_TLS_C) && defined(POLARSSL_SSL_CLI_C) && \
     defined(POLARSSL_NET_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_CTR_DRBG_C) && defined(POLARSSL_X509_CRT_PARSE_C)
-#include "polarssl/net.h"
-#include "polarssl/debug.h"
-#include "polarssl/ssl.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/error.h"
-#include "polarssl/certs.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 <stdio.h>
 #include <string.h>
diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c
index 48ceeb2..46389ae 100644
--- a/programs/ssl/ssl_client2.c
+++ b/programs/ssl/ssl_client2.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -39,14 +39,14 @@
 #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_SSL_TLS_C) && defined(POLARSSL_SSL_CLI_C) && \
     defined(POLARSSL_NET_C) && defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/net.h"
-#include "polarssl/ssl.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/certs.h"
-#include "polarssl/x509.h"
-#include "polarssl/error.h"
-#include "polarssl/debug.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 <stdio.h>
 #include <stdlib.h>
@@ -54,7 +54,7 @@
 #endif
 
 #if defined(POLARSSL_TIMING_C)
-#include "polarssl/timing.h"
+#include "mbedtls/timing.h"
 #endif
 
 #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c
index 3408364..b58d8d2 100644
--- a/programs/ssl/ssl_fork_server.c
+++ b/programs/ssl/ssl_fork_server.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -44,13 +44,13 @@
     defined(POLARSSL_RSA_C) && defined(POLARSSL_CTR_DRBG_C) && \
     defined(POLARSSL_X509_CRT_PARSE_C) && defined(POLARSSL_TIMING_C) && \
     defined(POLARSSL_FS_IO)
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/certs.h"
-#include "polarssl/x509.h"
-#include "polarssl/ssl.h"
-#include "polarssl/net.h"
-#include "polarssl/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/net.h"
+#include "mbedtls/timing.h"
 
 #include <string.h>
 #include <stdio.h>
diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c
index 92ebed0..41e0777 100644
--- a/programs/ssl/ssl_mail_client.c
+++ b/programs/ssl/ssl_mail_client.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -39,14 +39,14 @@
     defined(POLARSSL_NET_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_CTR_DRBG_C) && defined(POLARSSL_X509_CRT_PARSE_C) && \
     defined(POLARSSL_FS_IO)
-#include "polarssl/base64.h"
-#include "polarssl/error.h"
-#include "polarssl/net.h"
-#include "polarssl/ssl.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/certs.h"
-#include "polarssl/x509.h"
+#include "mbedtls/base64.h"
+#include "mbedtls/error.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 <stdio.h>
 #include <stdlib.h>
diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c
index 5f12b96..5222435 100644
--- a/programs/ssl/ssl_pthread_server.c
+++ b/programs/ssl/ssl_pthread_server.c
@@ -22,13 +22,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -46,13 +46,13 @@
     defined(POLARSSL_RSA_C) && defined(POLARSSL_CTR_DRBG_C) && \
     defined(POLARSSL_X509_CRT_PARSE_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_THREADING_C) && defined(POLARSSL_THREADING_PTHREAD)
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/certs.h"
-#include "polarssl/x509.h"
-#include "polarssl/ssl.h"
-#include "polarssl/net.h"
-#include "polarssl/error.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 <stdio.h>
 #include <stdlib.h>
@@ -60,11 +60,11 @@
 #endif
 
 #if defined(POLARSSL_SSL_CACHE_C)
-#include "polarssl/ssl_cache.h"
+#include "mbedtls/ssl_cache.h"
 #endif
 
 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
-#include "polarssl/memory_buffer_alloc.h"
+#include "mbedtls/memory_buffer_alloc.h"
 #endif
 
 #define HTTP_RESPONSE \
diff --git a/programs/ssl/ssl_server.c b/programs/ssl/ssl_server.c
index eb5cd25..9c45e14 100644
--- a/programs/ssl/ssl_server.c
+++ b/programs/ssl/ssl_server.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -43,14 +43,14 @@
     defined(POLARSSL_SSL_SRV_C) && defined(POLARSSL_NET_C) && \
     defined(POLARSSL_RSA_C) && defined(POLARSSL_CTR_DRBG_C) && \
     defined(POLARSSL_X509_CRT_PARSE_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/certs.h"
-#include "polarssl/x509.h"
-#include "polarssl/ssl.h"
-#include "polarssl/net.h"
-#include "polarssl/error.h"
-#include "polarssl/debug.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 <stdio.h>
 #include <stdlib.h>
@@ -58,7 +58,7 @@
 #endif
 
 #if defined(POLARSSL_SSL_CACHE_C)
-#include "polarssl/ssl_cache.h"
+#include "mbedtls/ssl_cache.h"
 #endif
 
 #define HTTP_RESPONSE \
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index ad0631b..c935165 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_free       free
@@ -47,14 +47,14 @@
 #if defined(POLARSSL_ENTROPY_C) && \
     defined(POLARSSL_SSL_TLS_C) && defined(POLARSSL_SSL_SRV_C) && \
     defined(POLARSSL_NET_C) && defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/net.h"
-#include "polarssl/ssl.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/certs.h"
-#include "polarssl/x509.h"
-#include "polarssl/error.h"
-#include "polarssl/debug.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 <stdio.h>
 #include <stdlib.h>
@@ -66,15 +66,15 @@
 #endif
 
 #if defined(POLARSSL_SSL_CACHE_C)
-#include "polarssl/ssl_cache.h"
+#include "mbedtls/ssl_cache.h"
 #endif
 
 #if defined(POLARSSL_SSL_COOKIE_C)
-#include "polarssl/ssl_cookie.h"
+#include "mbedtls/ssl_cookie.h"
 #endif
 
 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
-#include "polarssl/memory_buffer_alloc.h"
+#include "mbedtls/memory_buffer_alloc.h"
 #endif
 
 #define DFL_SERVER_ADDR         NULL
diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c
index 1a308be..59239e1 100644
--- a/programs/test/benchmark.c
+++ b/programs/test/benchmark.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_exit       exit
@@ -46,32 +46,32 @@
 
 #include <string.h>
 
-#include "polarssl/timing.h"
+#include "mbedtls/timing.h"
 
-#include "polarssl/md4.h"
-#include "polarssl/md5.h"
-#include "polarssl/ripemd160.h"
-#include "polarssl/sha1.h"
-#include "polarssl/sha256.h"
-#include "polarssl/sha512.h"
-#include "polarssl/arc4.h"
-#include "polarssl/des.h"
-#include "polarssl/aes.h"
-#include "polarssl/blowfish.h"
-#include "polarssl/camellia.h"
-#include "polarssl/gcm.h"
-#include "polarssl/ccm.h"
-#include "polarssl/havege.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/hmac_drbg.h"
-#include "polarssl/rsa.h"
-#include "polarssl/dhm.h"
-#include "polarssl/ecdsa.h"
-#include "polarssl/ecdh.h"
-#include "polarssl/error.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/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"
 
 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
-#include "polarssl/memory_buffer_alloc.h"
+#include "mbedtls/memory_buffer_alloc.h"
 #endif
 
 #if defined _MSC_VER && !defined snprintf
diff --git a/programs/test/selftest.c b/programs/test/selftest.c
index 280e3b7..0e1a8be 100644
--- a/programs/test/selftest.c
+++ b/programs/test/selftest.c
@@ -21,50 +21,50 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
-#include "polarssl/entropy.h"
-#include "polarssl/hmac_drbg.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/dhm.h"
-#include "polarssl/gcm.h"
-#include "polarssl/ccm.h"
-#include "polarssl/md2.h"
-#include "polarssl/md4.h"
-#include "polarssl/md5.h"
-#include "polarssl/ripemd160.h"
-#include "polarssl/sha1.h"
-#include "polarssl/sha256.h"
-#include "polarssl/sha512.h"
-#include "polarssl/arc4.h"
-#include "polarssl/des.h"
-#include "polarssl/aes.h"
-#include "polarssl/camellia.h"
-#include "polarssl/base64.h"
-#include "polarssl/bignum.h"
-#include "polarssl/rsa.h"
-#include "polarssl/x509.h"
-#include "polarssl/xtea.h"
-#include "polarssl/pkcs5.h"
-#include "polarssl/pbkdf2.h"
-#include "polarssl/ecp.h"
-#include "polarssl/timing.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/pbkdf2.h"
+#include "mbedtls/ecp.h"
+#include "mbedtls/timing.h"
 
 #include <stdio.h>
 #include <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
 #endif
 
 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
-#include "polarssl/memory_buffer_alloc.h"
+#include "mbedtls/memory_buffer_alloc.h"
 #endif
 
 int main( int argc, char *argv[] )
diff --git a/programs/test/ssl_cert_test.c b/programs/test/ssl_cert_test.c
index d823964..d9960d2 100644
--- a/programs/test/ssl_cert_test.c
+++ b/programs/test/ssl_cert_test.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_snprintf   snprintf
@@ -37,8 +37,8 @@
 
 #if defined(POLARSSL_RSA_C) && defined(POLARSSL_X509_CRT_PARSE_C) && \
     defined(POLARSSL_FS_IO) && defined(POLARSSL_X509_CRL_PARSE_C)
-#include "polarssl/certs.h"
-#include "polarssl/x509_crt.h"
+#include "mbedtls/certs.h"
+#include "mbedtls/x509_crt.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/programs/test/udp_proxy.c b/programs/test/udp_proxy.c
index 05393ab..f5faa29 100644
--- a/programs/test/udp_proxy.c
+++ b/programs/test/udp_proxy.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #define polarssl_printf     printf
 #endif
@@ -41,9 +41,9 @@
 }
 #else
 
-#include "polarssl/net.h"
-#include "polarssl/error.h"
-#include "polarssl/ssl.h"
+#include "mbedtls/net.h"
+#include "mbedtls/error.h"
+#include "mbedtls/ssl.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/util/pem2der.c b/programs/util/pem2der.c
index 8ef3e4b..857cbb6 100644
--- a/programs/util/pem2der.c
+++ b/programs/util/pem2der.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_free       free
@@ -36,8 +36,8 @@
 #endif
 
 #if defined(POLARSSL_BASE64_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/error.h"
-#include "polarssl/base64.h"
+#include "mbedtls/error.h"
+#include "mbedtls/base64.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/util/strerror.c b/programs/util/strerror.c
index 715bd3f..9145e74 100644
--- a/programs/util/strerror.c
+++ b/programs/util/strerror.c
@@ -21,20 +21,20 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
 #endif
 
 #if defined(POLARSSL_ERROR_C) || defined(POLARSSL_ERROR_STRERROR_DUMMY)
-#include "polarssl/error.h"
+#include "mbedtls/error.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/x509/cert_app.c b/programs/x509/cert_app.c
index 0c564bd..9d8588c 100644
--- a/programs/x509/cert_app.c
+++ b/programs/x509/cert_app.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_fprintf    fprintf
@@ -39,11 +39,11 @@
     defined(POLARSSL_NET_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_X509_CRT_PARSE_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/net.h"
-#include "polarssl/ssl.h"
-#include "polarssl/x509.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/net.h"
+#include "mbedtls/ssl.h"
+#include "mbedtls/x509.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c
index 83766ea..e78f87c 100644
--- a/programs/x509/cert_req.c
+++ b/programs/x509/cert_req.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -36,10 +36,10 @@
 #if defined(POLARSSL_X509_CSR_WRITE_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_PK_PARSE_C) && \
     defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_CTR_DRBG_C)
-#include "polarssl/x509_csr.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/error.h"
+#include "mbedtls/x509_csr.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/error.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c
index 5653da2..8436b92 100644
--- a/programs/x509/cert_write.c
+++ b/programs/x509/cert_write.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -37,11 +37,11 @@
     defined(POLARSSL_X509_CRT_PARSE_C) && defined(POLARSSL_FS_IO) && \
     defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_CTR_DRBG_C) && \
     defined(POLARSSL_ERROR_C)
-#include "polarssl/x509_crt.h"
-#include "polarssl/x509_csr.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
-#include "polarssl/error.h"
+#include "mbedtls/x509_crt.h"
+#include "mbedtls/x509_csr.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/error.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/x509/crl_app.c b/programs/x509/crl_app.c
index ff80a3d..64eeb83 100644
--- a/programs/x509/crl_app.c
+++ b/programs/x509/crl_app.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -35,7 +35,7 @@
 
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_X509_CRL_PARSE_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/x509_crl.h"
+#include "mbedtls/x509_crl.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/programs/x509/req_app.c b/programs/x509/req_app.c
index 1164fd6..644b8ef 100644
--- a/programs/x509/req_app.c
+++ b/programs/x509/req_app.c
@@ -21,13 +21,13 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
@@ -35,7 +35,7 @@
 
 #if defined(POLARSSL_BIGNUM_C) && defined(POLARSSL_RSA_C) && \
     defined(POLARSSL_X509_CSR_PARSE_C) && defined(POLARSSL_FS_IO)
-#include "polarssl/x509_csr.h"
+#include "mbedtls/x509_csr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/scripts/bump_version.sh b/scripts/bump_version.sh
index 64af2dc..a487982 100755
--- a/scripts/bump_version.sh
+++ b/scripts/bump_version.sh
@@ -60,10 +60,10 @@
   mv tmp library/Makefile
 fi
 
-[ $VERBOSE ] && echo "Bumping VERSION in include/polarssl/version.h"
+[ $VERBOSE ] && echo "Bumping VERSION in include/mbedtls/version.h"
 read MAJOR MINOR PATCH <<<$(IFS="."; echo $VERSION)
 VERSION_NR="$( printf "0x%02X%02X%02X00" $MAJOR $MINOR $PATCH )"
-cat include/polarssl/version.h |                                    \
+cat include/mbedtls/version.h |                                    \
     sed -e "s/_VERSION_MAJOR .\+/_VERSION_MAJOR  $MAJOR/" |    \
     sed -e "s/_VERSION_MINOR .\+/_VERSION_MINOR  $MINOR/" |    \
     sed -e "s/_VERSION_PATCH .\+/_VERSION_PATCH  $PATCH/" |    \
@@ -71,7 +71,7 @@
     sed -e "s/_VERSION_STRING .\+/_VERSION_STRING         \"$VERSION\"/" |    \
     sed -e "s/_VERSION_STRING_FULL .\+/_VERSION_STRING_FULL    \"mbed TLS $VERSION\"/" \
     > tmp
-mv tmp include/polarssl/version.h
+mv tmp include/mbedtls/version.h
 
 [ $VERBOSE ] && echo "Bumping version in tests/suites/test_suite_version.data"
 sed -e "s/version:\".\+/version:\"$VERSION\"/g" < tests/suites/test_suite_version.data > tmp
diff --git a/scripts/check_doxy_blocks.pl b/scripts/check_doxy_blocks.pl
index 2601d88..e62d4da 100755
--- a/scripts/check_doxy_blocks.pl
+++ b/scripts/check_doxy_blocks.pl
@@ -13,7 +13,7 @@
 use File::Basename;
 
 # header files in the following directories will be checked
-my @directories = qw(include/polarssl library doxygen/input);
+my @directories = qw(include/mbedtls library doxygen/input);
 
 # very naive pattern to find directives:
 # everything with a backslach except '\0' and backslash at EOL
diff --git a/scripts/config.pl b/scripts/config.pl
index c105a23..ace5459 100755
--- a/scripts/config.pl
+++ b/scripts/config.pl
@@ -36,7 +36,7 @@
 _ALT\s*$
 );
 
-my $config_file = "include/polarssl/config.h";
+my $config_file = "include/mbedtls/config.h";
 
 # get -f option
 if (@ARGV >= 2 && $ARGV[0] eq "-f") {
diff --git a/scripts/data_files/error.fmt b/scripts/data_files/error.fmt
index 7449d85..98799a1 100644
--- a/scripts/data_files/error.fmt
+++ b/scripts/data_files/error.fmt
@@ -21,18 +21,18 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_ERROR_C) || defined(POLARSSL_ERROR_STRERROR_DUMMY)
-#include "polarssl/error.h"
+#include "mbedtls/error.h"
 #include <string.h>
 #endif
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #define polarssl_snprintf snprintf
 #endif
diff --git a/scripts/data_files/version_features.fmt b/scripts/data_files/version_features.fmt
index 500e026..59b70a1 100644
--- a/scripts/data_files/version_features.fmt
+++ b/scripts/data_files/version_features.fmt
@@ -21,14 +21,14 @@
  */
 
 #if !defined(POLARSSL_CONFIG_FILE)
-#include "polarssl/config.h"
+#include "mbedtls/config.h"
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
 
 #if defined(POLARSSL_VERSION_C)
 
-#include "polarssl/version.h"
+#include "mbedtls/version.h"
 
 #include <string.h>
 
diff --git a/scripts/ecc-heap.sh b/scripts/ecc-heap.sh
index 4f88a44..dcec84b 100755
--- a/scripts/ecc-heap.sh
+++ b/scripts/ecc-heap.sh
@@ -9,7 +9,7 @@
 
 set -eu
 
-CONFIG_H='include/polarssl/config.h'
+CONFIG_H='include/mbedtls/config.h'
 
 if [ -r $CONFIG_H ]; then :; else
     echo "$CONFIG_H not found" >&2
diff --git a/scripts/generate_errors.pl b/scripts/generate_errors.pl
index c0d9685..02b2aaf 100755
--- a/scripts/generate_errors.pl
+++ b/scripts/generate_errors.pl
@@ -16,7 +16,7 @@
     -d $include_dir or die "No such directory: $include_dir\n";
     -d $data_dir or die "No such directory: $data_dir\n";
 } else {
-    $include_dir = 'include/polarssl';
+    $include_dir = 'include/mbedtls';
     $data_dir = 'scripts/data_files';
     $error_file = 'library/error.c';
 
@@ -143,7 +143,7 @@
                                                     ($include_name ne "");
         }
         ${$code_check} .= "\n";
-        $headers .= "\n#include \"polarssl/${include_name}.h\"\n".
+        $headers .= "\n#include \"mbedtls/${include_name}.h\"\n".
                     "#endif\n\n" if ($include_name ne "");
         ${$old_define} = $define_name;
     }
diff --git a/scripts/generate_features.pl b/scripts/generate_features.pl
index ee94e35..2aa695c 100755
--- a/scripts/generate_features.pl
+++ b/scripts/generate_features.pl
@@ -12,7 +12,7 @@
     -d $include_dir or die "No such directory: $include_dir\n";
     -d $data_dir or die "No such directory: $data_dir\n";
 } else {
-    $include_dir = 'include/polarssl';
+    $include_dir = 'include/mbedtls';
     $data_dir = 'scripts/data_files';
     $feature_file = 'library/version_features.c';
 
diff --git a/scripts/generate_visualc_files.pl b/scripts/generate_visualc_files.pl
index d6f7104..fd69237 100755
--- a/scripts/generate_visualc_files.pl
+++ b/scripts/generate_visualc_files.pl
@@ -28,7 +28,7 @@
 my $vsx_sln_file = "$vsx_dir/mbedTLS.sln";
 
 my $programs_dir = 'programs';
-my $header_dir = 'include/polarssl';
+my $header_dir = 'include/mbedtls';
 my $source_dir = 'library';
 
 # Need windows line endings!
diff --git a/scripts/memory.sh b/scripts/memory.sh
index 710ee96..2e56215 100755
--- a/scripts/memory.sh
+++ b/scripts/memory.sh
@@ -8,7 +8,7 @@
 
 set -eu
 
-CONFIG_H='include/polarssl/config.h'
+CONFIG_H='include/mbedtls/config.h'
 
 CLIENT='mini_client'
 
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index b525c3a..47abfb9 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -17,7 +17,7 @@
     exit 1
 fi
 
-CONFIG_H='include/polarssl/config.h'
+CONFIG_H='include/mbedtls/config.h'
 CONFIG_BAK="$CONFIG_H.bak"
 
 MEMORY=0
@@ -42,7 +42,7 @@
     make clean
 
     find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} \+
-    rm -f include/Makefile include/polarssl/Makefile programs/*/Makefile
+    rm -f include/Makefile include/mbedtls/Makefile programs/*/Makefile
     git update-index --no-skip-worktree Makefile library/Makefile programs/Makefile tests/Makefile
     git checkout -- Makefile library/Makefile programs/Makefile tests/Makefile
 
diff --git a/tests/scripts/curves.pl b/tests/scripts/curves.pl
index 8a1e6b6..4e338b5 100755
--- a/tests/scripts/curves.pl
+++ b/tests/scripts/curves.pl
@@ -12,7 +12,7 @@
 -d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n";
 
 my $sed_cmd = 's/^#define \(POLARSSL_ECP_DP.*_ENABLED\)/\1/p';
-my $config_h = 'include/polarssl/config.h';
+my $config_h = 'include/mbedtls/config.h';
 my @curves = split( /\s+/, `sed -n -e '$sed_cmd' $config_h` );
 
 my $test = system( "grep -i cmake Makefile >/dev/null" ) ? 'check' : 'test';
diff --git a/tests/scripts/generate_code.pl b/tests/scripts/generate_code.pl
index ba74738..6d5d005 100755
--- a/tests/scripts/generate_code.pl
+++ b/tests/scripts/generate_code.pl
@@ -60,7 +60,7 @@
 open(TEST_FILE, ">$test_file") or die "Opening destination file '$test_file': $!";
 print TEST_FILE << "END";
 #if !defined(POLARSSL_CONFIG_FILE)
-#include <polarssl/config.h>
+#include <mbedtls/config.h>
 #else
 #include POLARSSL_CONFIG_FILE
 #endif
diff --git a/tests/scripts/test-ref-configs.pl b/tests/scripts/test-ref-configs.pl
index 057b8be..e4fc874 100755
--- a/tests/scripts/test-ref-configs.pl
+++ b/tests/scripts/test-ref-configs.pl
@@ -42,7 +42,7 @@
 
 my $test = system( "grep -i cmake Makefile >/dev/null" ) ? 'check' : 'test';
 
-my $config_h = 'include/polarssl/config.h';
+my $config_h = 'include/mbedtls/config.h';
 
 system( "cp $config_h $config_h.bak" ) and die;
 sub abort {
diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh
index 634b149..b54b777 100755
--- a/tests/ssl-opt.sh
+++ b/tests/ssl-opt.sh
@@ -27,7 +27,7 @@
 FAILS=0
 SKIPS=0
 
-CONFIG_H='../include/polarssl/config.h'
+CONFIG_H='../include/mbedtls/config.h'
 
 MEMCHECK=0
 FILTER='.*'
diff --git a/tests/suites/helpers.function b/tests/suites/helpers.function
index 0f07485..54786af 100644
--- a/tests/suites/helpers.function
+++ b/tests/suites/helpers.function
@@ -1,5 +1,5 @@
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_printf     printf
diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function
index d67d875..5342fb3 100644
--- a/tests/suites/main_test.function
+++ b/tests/suites/main_test.function
@@ -1,7 +1,7 @@
 #include <string.h>
 
 #if defined(POLARSSL_PLATFORM_C)
-#include "polarssl/platform.h"
+#include "mbedtls/platform.h"
 #else
 #include <stdio.h>
 #define polarssl_exit       exit
@@ -12,7 +12,7 @@
 #endif
 
 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
-#include "polarssl/memory_buffer_alloc.h"
+#include "mbedtls/memory_buffer_alloc.h"
 #endif
 
 static int test_errors = 0;
diff --git a/tests/suites/test_suite_aes.function b/tests/suites/test_suite_aes.function
index 7027247..8cc16e5 100644
--- a/tests/suites/test_suite_aes.function
+++ b/tests/suites/test_suite_aes.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/aes.h"
+#include "mbedtls/aes.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_arc4.function b/tests/suites/test_suite_arc4.function
index dc7b24b..6bc5d1f 100644
--- a/tests/suites/test_suite_arc4.function
+++ b/tests/suites/test_suite_arc4.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/arc4.h"
+#include "mbedtls/arc4.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_asn1write.function b/tests/suites/test_suite_asn1write.function
index 49b073a..62a1b99 100644
--- a/tests/suites/test_suite_asn1write.function
+++ b/tests/suites/test_suite_asn1write.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/asn1write.h"
+#include "mbedtls/asn1write.h"
 
 #define GUARD_LEN 4
 #define GUARD_VAL 0x2a
diff --git a/tests/suites/test_suite_base64.function b/tests/suites/test_suite_base64.function
index a8348d2..57c2989 100644
--- a/tests/suites/test_suite_base64.function
+++ b/tests/suites/test_suite_base64.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/base64.h"
+#include "mbedtls/base64.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_blowfish.function b/tests/suites/test_suite_blowfish.function
index b058698..5a2a712 100644
--- a/tests/suites/test_suite_blowfish.function
+++ b/tests/suites/test_suite_blowfish.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/blowfish.h"
+#include "mbedtls/blowfish.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_camellia.function b/tests/suites/test_suite_camellia.function
index e73aa86..ef6a72b 100644
--- a/tests/suites/test_suite_camellia.function
+++ b/tests/suites/test_suite_camellia.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/camellia.h"
+#include "mbedtls/camellia.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_ccm.function b/tests/suites/test_suite_ccm.function
index d8ca4f5..2022fc6 100644
--- a/tests/suites/test_suite_ccm.function
+++ b/tests/suites/test_suite_ccm.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/ccm.h"
+#include "mbedtls/ccm.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_cipher.function b/tests/suites/test_suite_cipher.function
index 448bfcc..471bcef 100644
--- a/tests/suites/test_suite_cipher.function
+++ b/tests/suites/test_suite_cipher.function
@@ -1,8 +1,8 @@
 /* BEGIN_HEADER */
-#include "polarssl/cipher.h"
+#include "mbedtls/cipher.h"
 
 #if defined(POLARSSL_GCM_C)
-#include "polarssl/gcm.h"
+#include "mbedtls/gcm.h"
 #endif
 /* END_HEADER */
 
diff --git a/tests/suites/test_suite_ctr_drbg.function b/tests/suites/test_suite_ctr_drbg.function
index 644eb46..6b3028a 100644
--- a/tests/suites/test_suite_ctr_drbg.function
+++ b/tests/suites/test_suite_ctr_drbg.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/ctr_drbg.h"
 
 int test_offset_idx;
 int entropy_func( void *data, unsigned char *buf, size_t len )
diff --git a/tests/suites/test_suite_debug.function b/tests/suites/test_suite_debug.function
index 7db04e5..a76ba9f 100644
--- a/tests/suites/test_suite_debug.function
+++ b/tests/suites/test_suite_debug.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/debug.h"
+#include "mbedtls/debug.h"
 
 struct buffer_data
 {
diff --git a/tests/suites/test_suite_des.function b/tests/suites/test_suite_des.function
index dfa168f..bb21a58 100644
--- a/tests/suites/test_suite_des.function
+++ b/tests/suites/test_suite_des.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/des.h"
+#include "mbedtls/des.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_dhm.function b/tests/suites/test_suite_dhm.function
index d7cabf4..4e8ad33 100644
--- a/tests/suites/test_suite_dhm.function
+++ b/tests/suites/test_suite_dhm.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/dhm.h"
+#include "mbedtls/dhm.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_ecdh.function b/tests/suites/test_suite_ecdh.function
index 27be969..795b409 100644
--- a/tests/suites/test_suite_ecdh.function
+++ b/tests/suites/test_suite_ecdh.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/ecdh.h"
+#include "mbedtls/ecdh.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_ecdsa.function b/tests/suites/test_suite_ecdsa.function
index ee379dc..98d834a 100644
--- a/tests/suites/test_suite_ecdsa.function
+++ b/tests/suites/test_suite_ecdsa.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/ecdsa.h"
+#include "mbedtls/ecdsa.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_ecp.function b/tests/suites/test_suite_ecp.function
index 696c597..1114920 100644
--- a/tests/suites/test_suite_ecp.function
+++ b/tests/suites/test_suite_ecp.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/ecp.h"
+#include "mbedtls/ecp.h"
 
 #define POLARSSL_ECP_PF_UNKNOWN     -1
 /* END_HEADER */
diff --git a/tests/suites/test_suite_entropy.function b/tests/suites/test_suite_entropy.function
index c46246c..41a115c 100644
--- a/tests/suites/test_suite_entropy.function
+++ b/tests/suites/test_suite_entropy.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/entropy.h"
+#include "mbedtls/entropy.h"
 
 /*
  * Number of calls made to entropy_dummy_source()
diff --git a/tests/suites/test_suite_error.function b/tests/suites/test_suite_error.function
index 87287b7..8ed3b61 100644
--- a/tests/suites/test_suite_error.function
+++ b/tests/suites/test_suite_error.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/error.h"
+#include "mbedtls/error.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_gcm.function b/tests/suites/test_suite_gcm.function
index 2ac7628..a3b112e 100644
--- a/tests/suites/test_suite_gcm.function
+++ b/tests/suites/test_suite_gcm.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/gcm.h"
+#include "mbedtls/gcm.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_hmac_drbg.function b/tests/suites/test_suite_hmac_drbg.function
index 56267e0..2e4e83c 100644
--- a/tests/suites/test_suite_hmac_drbg.function
+++ b/tests/suites/test_suite_hmac_drbg.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/hmac_drbg.h"
+#include "mbedtls/hmac_drbg.h"
 
 typedef struct
 {
diff --git a/tests/suites/test_suite_hmac_shax.function b/tests/suites/test_suite_hmac_shax.function
index b31d772..761c281 100644
--- a/tests/suites/test_suite_hmac_shax.function
+++ b/tests/suites/test_suite_hmac_shax.function
@@ -1,7 +1,7 @@
 /* BEGIN_HEADER */
-#include "polarssl/sha1.h"
-#include "polarssl/sha256.h"
-#include "polarssl/sha512.h"
+#include "mbedtls/sha1.h"
+#include "mbedtls/sha256.h"
+#include "mbedtls/sha512.h"
 /* END_HEADER */
 
 /* BEGIN_CASE depends_on:POLARSSL_SHA1_C */
diff --git a/tests/suites/test_suite_md.function b/tests/suites/test_suite_md.function
index 40eb717..98dac47 100644
--- a/tests/suites/test_suite_md.function
+++ b/tests/suites/test_suite_md.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/md.h"
+#include "mbedtls/md.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_mdx.function b/tests/suites/test_suite_mdx.function
index 6e4c6d8..4615271 100644
--- a/tests/suites/test_suite_mdx.function
+++ b/tests/suites/test_suite_mdx.function
@@ -1,8 +1,8 @@
 /* BEGIN_HEADER */
-#include "polarssl/md2.h"
-#include "polarssl/md4.h"
-#include "polarssl/md5.h"
-#include "polarssl/ripemd160.h"
+#include "mbedtls/md2.h"
+#include "mbedtls/md4.h"
+#include "mbedtls/md5.h"
+#include "mbedtls/ripemd160.h"
 /* END_HEADER */
 
 /* BEGIN_CASE depends_on:POLARSSL_MD2_C */
diff --git a/tests/suites/test_suite_memory_buffer_alloc.function b/tests/suites/test_suite_memory_buffer_alloc.function
index e9cd021..704279c 100644
--- a/tests/suites/test_suite_memory_buffer_alloc.function
+++ b/tests/suites/test_suite_memory_buffer_alloc.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/memory_buffer_alloc.h"
+#include "mbedtls/memory_buffer_alloc.h"
 #define TEST_SUITE_MEMORY_BUFFER_ALLOC
 /* END_HEADER */
 
diff --git a/tests/suites/test_suite_mpi.function b/tests/suites/test_suite_mpi.function
index ce1a072..75c8d30 100644
--- a/tests/suites/test_suite_mpi.function
+++ b/tests/suites/test_suite_mpi.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/bignum.h"
+#include "mbedtls/bignum.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_pbkdf2.function b/tests/suites/test_suite_pbkdf2.function
index f99cb6d..6b8b278 100644
--- a/tests/suites/test_suite_pbkdf2.function
+++ b/tests/suites/test_suite_pbkdf2.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/pbkdf2.h"
+#include "mbedtls/pbkdf2.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_pem.function b/tests/suites/test_suite_pem.function
index f8aab47..9318d1d 100644
--- a/tests/suites/test_suite_pem.function
+++ b/tests/suites/test_suite_pem.function
@@ -1,6 +1,6 @@
 /* BEGIN_HEADER */
-#include "polarssl/base64.h"
-#include "polarssl/pem.h"
+#include "mbedtls/base64.h"
+#include "mbedtls/pem.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_pk.function b/tests/suites/test_suite_pk.function
index cc378c4..bedf75c 100644
--- a/tests/suites/test_suite_pk.function
+++ b/tests/suites/test_suite_pk.function
@@ -1,9 +1,9 @@
 /* BEGIN_HEADER */
-#include "polarssl/pk.h"
+#include "mbedtls/pk.h"
 
 /* For error codes */
-#include "polarssl/ecp.h"
-#include "polarssl/rsa.h"
+#include "mbedtls/ecp.h"
+#include "mbedtls/rsa.h"
 
 static int rnd_std_rand( void *rng_state, unsigned char *output, size_t len );
 
diff --git a/tests/suites/test_suite_pkcs1_v21.function b/tests/suites/test_suite_pkcs1_v21.function
index 6fbe2e1..ab87a70 100644
--- a/tests/suites/test_suite_pkcs1_v21.function
+++ b/tests/suites/test_suite_pkcs1_v21.function
@@ -1,6 +1,6 @@
 /* BEGIN_HEADER */
-#include "polarssl/rsa.h"
-#include "polarssl/md.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/md.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_pkcs5.function b/tests/suites/test_suite_pkcs5.function
index f7165f6..6074e04 100644
--- a/tests/suites/test_suite_pkcs5.function
+++ b/tests/suites/test_suite_pkcs5.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/pkcs5.h"
+#include "mbedtls/pkcs5.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_pkparse.function b/tests/suites/test_suite_pkparse.function
index 9479cd9..8927397 100644
--- a/tests/suites/test_suite_pkparse.function
+++ b/tests/suites/test_suite_pkparse.function
@@ -1,7 +1,7 @@
 /* BEGIN_HEADER */
-#include "polarssl/pk.h"
-#include "polarssl/pem.h"
-#include "polarssl/oid.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/pem.h"
+#include "mbedtls/oid.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_pkwrite.function b/tests/suites/test_suite_pkwrite.function
index 8b5fafb..be0ab60 100644
--- a/tests/suites/test_suite_pkwrite.function
+++ b/tests/suites/test_suite_pkwrite.function
@@ -1,7 +1,7 @@
 /* BEGIN_HEADER */
-#include "polarssl/pk.h"
-#include "polarssl/pem.h"
-#include "polarssl/oid.h"
+#include "mbedtls/pk.h"
+#include "mbedtls/pem.h"
+#include "mbedtls/oid.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_rsa.function b/tests/suites/test_suite_rsa.function
index 45d5723..3c61f51 100644
--- a/tests/suites/test_suite_rsa.function
+++ b/tests/suites/test_suite_rsa.function
@@ -1,13 +1,13 @@
 /* BEGIN_HEADER */
-#include "polarssl/rsa.h"
-#include "polarssl/md2.h"
-#include "polarssl/md4.h"
-#include "polarssl/md5.h"
-#include "polarssl/sha1.h"
-#include "polarssl/sha256.h"
-#include "polarssl/sha512.h"
-#include "polarssl/entropy.h"
-#include "polarssl/ctr_drbg.h"
+#include "mbedtls/rsa.h"
+#include "mbedtls/md2.h"
+#include "mbedtls/md4.h"
+#include "mbedtls/md5.h"
+#include "mbedtls/sha1.h"
+#include "mbedtls/sha256.h"
+#include "mbedtls/sha512.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/ctr_drbg.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_shax.function b/tests/suites/test_suite_shax.function
index 51c3301..29ede71 100644
--- a/tests/suites/test_suite_shax.function
+++ b/tests/suites/test_suite_shax.function
@@ -1,7 +1,7 @@
 /* BEGIN_HEADER */
-#include "polarssl/sha1.h"
-#include "polarssl/sha256.h"
-#include "polarssl/sha512.h"
+#include "mbedtls/sha1.h"
+#include "mbedtls/sha256.h"
+#include "mbedtls/sha512.h"
 /* END_HEADER */
 
 /* BEGIN_CASE depends_on:POLARSSL_SHA1_C */
diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function
index f138c2f..4de888f 100644
--- a/tests/suites/test_suite_ssl.function
+++ b/tests/suites/test_suite_ssl.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include <polarssl/ssl.h>
+#include <mbedtls/ssl.h>
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_version.function b/tests/suites/test_suite_version.function
index fd12032..bfa52ff 100644
--- a/tests/suites/test_suite_version.function
+++ b/tests/suites/test_suite_version.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/version.h"
+#include "mbedtls/version.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function
index 50de457..7440859 100644
--- a/tests/suites/test_suite_x509parse.function
+++ b/tests/suites/test_suite_x509parse.function
@@ -1,10 +1,10 @@
 /* BEGIN_HEADER */
-#include "polarssl/x509_crt.h"
-#include "polarssl/x509_crl.h"
-#include "polarssl/x509_csr.h"
-#include "polarssl/pem.h"
-#include "polarssl/oid.h"
-#include "polarssl/base64.h"
+#include "mbedtls/x509_crt.h"
+#include "mbedtls/x509_crl.h"
+#include "mbedtls/x509_csr.h"
+#include "mbedtls/pem.h"
+#include "mbedtls/oid.h"
+#include "mbedtls/base64.h"
 
 int verify_none( void *data, x509_crt *crt, int certificate_depth, int *flags )
 {
diff --git a/tests/suites/test_suite_x509write.function b/tests/suites/test_suite_x509write.function
index 63f35a6..fe4b9a6 100644
--- a/tests/suites/test_suite_x509write.function
+++ b/tests/suites/test_suite_x509write.function
@@ -1,8 +1,8 @@
 /* BEGIN_HEADER */
-#include "polarssl/x509_crt.h"
-#include "polarssl/x509_csr.h"
-#include "polarssl/pem.h"
-#include "polarssl/oid.h"
+#include "mbedtls/x509_crt.h"
+#include "mbedtls/x509_csr.h"
+#include "mbedtls/pem.h"
+#include "mbedtls/oid.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/tests/suites/test_suite_xtea.function b/tests/suites/test_suite_xtea.function
index d22c7fd..e7c1135 100644
--- a/tests/suites/test_suite_xtea.function
+++ b/tests/suites/test_suite_xtea.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "polarssl/xtea.h"
+#include "mbedtls/xtea.h"
 /* END_HEADER */
 
 /* BEGIN_DEPENDENCIES
diff --git a/visualc/VS2010/mbedTLS.vcxproj b/visualc/VS2010/mbedTLS.vcxproj
index 91c6c6d..907f108 100644
--- a/visualc/VS2010/mbedTLS.vcxproj
+++ b/visualc/VS2010/mbedTLS.vcxproj
@@ -142,70 +142,70 @@
     </Link>

   </ItemDefinitionGroup>

   <ItemGroup>

-    <ClInclude Include="..\..\include\polarssl\aes.h" />

-    <ClInclude Include="..\..\include\polarssl\aesni.h" />

-    <ClInclude Include="..\..\include\polarssl\arc4.h" />

-    <ClInclude Include="..\..\include\polarssl\asn1.h" />

-    <ClInclude Include="..\..\include\polarssl\asn1write.h" />

-    <ClInclude Include="..\..\include\polarssl\base64.h" />

-    <ClInclude Include="..\..\include\polarssl\bignum.h" />

-    <ClInclude Include="..\..\include\polarssl\blowfish.h" />

-    <ClInclude Include="..\..\include\polarssl\bn_mul.h" />

-    <ClInclude Include="..\..\include\polarssl\camellia.h" />

-    <ClInclude Include="..\..\include\polarssl\ccm.h" />

-    <ClInclude Include="..\..\include\polarssl\certs.h" />

-    <ClInclude Include="..\..\include\polarssl\check_config.h" />

-    <ClInclude Include="..\..\include\polarssl\cipher.h" />

-    <ClInclude Include="..\..\include\polarssl\cipher_wrap.h" />

-    <ClInclude Include="..\..\include\polarssl\config.h" />

-    <ClInclude Include="..\..\include\polarssl\ctr_drbg.h" />

-    <ClInclude Include="..\..\include\polarssl\debug.h" />

-    <ClInclude Include="..\..\include\polarssl\des.h" />

-    <ClInclude Include="..\..\include\polarssl\dhm.h" />

-    <ClInclude Include="..\..\include\polarssl\ecdh.h" />

-    <ClInclude Include="..\..\include\polarssl\ecdsa.h" />

-    <ClInclude Include="..\..\include\polarssl\ecp.h" />

-    <ClInclude Include="..\..\include\polarssl\entropy.h" />

-    <ClInclude Include="..\..\include\polarssl\entropy_poll.h" />

-    <ClInclude Include="..\..\include\polarssl\error.h" />

-    <ClInclude Include="..\..\include\polarssl\gcm.h" />

-    <ClInclude Include="..\..\include\polarssl\havege.h" />

-    <ClInclude Include="..\..\include\polarssl\hmac_drbg.h" />

-    <ClInclude Include="..\..\include\polarssl\md.h" />

-    <ClInclude Include="..\..\include\polarssl\md2.h" />

-    <ClInclude Include="..\..\include\polarssl\md4.h" />

-    <ClInclude Include="..\..\include\polarssl\md5.h" />

-    <ClInclude Include="..\..\include\polarssl\md_wrap.h" />

-    <ClInclude Include="..\..\include\polarssl\memory.h" />

-    <ClInclude Include="..\..\include\polarssl\memory_buffer_alloc.h" />

-    <ClInclude Include="..\..\include\polarssl\net.h" />

-    <ClInclude Include="..\..\include\polarssl\oid.h" />

-    <ClInclude Include="..\..\include\polarssl\padlock.h" />

-    <ClInclude Include="..\..\include\polarssl\pbkdf2.h" />

-    <ClInclude Include="..\..\include\polarssl\pem.h" />

-    <ClInclude Include="..\..\include\polarssl\pk.h" />

-    <ClInclude Include="..\..\include\polarssl\pk_wrap.h" />

-    <ClInclude Include="..\..\include\polarssl\pkcs11.h" />

-    <ClInclude Include="..\..\include\polarssl\pkcs12.h" />

-    <ClInclude Include="..\..\include\polarssl\pkcs5.h" />

-    <ClInclude Include="..\..\include\polarssl\platform.h" />

-    <ClInclude Include="..\..\include\polarssl\ripemd160.h" />

-    <ClInclude Include="..\..\include\polarssl\rsa.h" />

-    <ClInclude Include="..\..\include\polarssl\sha1.h" />

-    <ClInclude Include="..\..\include\polarssl\sha256.h" />

-    <ClInclude Include="..\..\include\polarssl\sha512.h" />

-    <ClInclude Include="..\..\include\polarssl\ssl.h" />

-    <ClInclude Include="..\..\include\polarssl\ssl_cache.h" />

-    <ClInclude Include="..\..\include\polarssl\ssl_ciphersuites.h" />

-    <ClInclude Include="..\..\include\polarssl\ssl_cookie.h" />

-    <ClInclude Include="..\..\include\polarssl\threading.h" />

-    <ClInclude Include="..\..\include\polarssl\timing.h" />

-    <ClInclude Include="..\..\include\polarssl\version.h" />

-    <ClInclude Include="..\..\include\polarssl\x509.h" />

-    <ClInclude Include="..\..\include\polarssl\x509_crl.h" />

-    <ClInclude Include="..\..\include\polarssl\x509_crt.h" />

-    <ClInclude Include="..\..\include\polarssl\x509_csr.h" />

-    <ClInclude Include="..\..\include\polarssl\xtea.h" />

+    <ClInclude Include="..\..\include\mbedtls\aes.h" />

+    <ClInclude Include="..\..\include\mbedtls\aesni.h" />

+    <ClInclude Include="..\..\include\mbedtls\arc4.h" />

+    <ClInclude Include="..\..\include\mbedtls\asn1.h" />

+    <ClInclude Include="..\..\include\mbedtls\asn1write.h" />

+    <ClInclude Include="..\..\include\mbedtls\base64.h" />

+    <ClInclude Include="..\..\include\mbedtls\bignum.h" />

+    <ClInclude Include="..\..\include\mbedtls\blowfish.h" />

+    <ClInclude Include="..\..\include\mbedtls\bn_mul.h" />

+    <ClInclude Include="..\..\include\mbedtls\camellia.h" />

+    <ClInclude Include="..\..\include\mbedtls\ccm.h" />

+    <ClInclude Include="..\..\include\mbedtls\certs.h" />

+    <ClInclude Include="..\..\include\mbedtls\check_config.h" />

+    <ClInclude Include="..\..\include\mbedtls\cipher.h" />

+    <ClInclude Include="..\..\include\mbedtls\cipher_wrap.h" />

+    <ClInclude Include="..\..\include\mbedtls\config.h" />

+    <ClInclude Include="..\..\include\mbedtls\ctr_drbg.h" />

+    <ClInclude Include="..\..\include\mbedtls\debug.h" />

+    <ClInclude Include="..\..\include\mbedtls\des.h" />

+    <ClInclude Include="..\..\include\mbedtls\dhm.h" />

+    <ClInclude Include="..\..\include\mbedtls\ecdh.h" />

+    <ClInclude Include="..\..\include\mbedtls\ecdsa.h" />

+    <ClInclude Include="..\..\include\mbedtls\ecp.h" />

+    <ClInclude Include="..\..\include\mbedtls\entropy.h" />

+    <ClInclude Include="..\..\include\mbedtls\entropy_poll.h" />

+    <ClInclude Include="..\..\include\mbedtls\error.h" />

+    <ClInclude Include="..\..\include\mbedtls\gcm.h" />

+    <ClInclude Include="..\..\include\mbedtls\havege.h" />

+    <ClInclude Include="..\..\include\mbedtls\hmac_drbg.h" />

+    <ClInclude Include="..\..\include\mbedtls\md.h" />

+    <ClInclude Include="..\..\include\mbedtls\md2.h" />

+    <ClInclude Include="..\..\include\mbedtls\md4.h" />

+    <ClInclude Include="..\..\include\mbedtls\md5.h" />

+    <ClInclude Include="..\..\include\mbedtls\md_wrap.h" />

+    <ClInclude Include="..\..\include\mbedtls\memory.h" />

+    <ClInclude Include="..\..\include\mbedtls\memory_buffer_alloc.h" />

+    <ClInclude Include="..\..\include\mbedtls\net.h" />

+    <ClInclude Include="..\..\include\mbedtls\oid.h" />

+    <ClInclude Include="..\..\include\mbedtls\padlock.h" />

+    <ClInclude Include="..\..\include\mbedtls\pbkdf2.h" />

+    <ClInclude Include="..\..\include\mbedtls\pem.h" />

+    <ClInclude Include="..\..\include\mbedtls\pk.h" />

+    <ClInclude Include="..\..\include\mbedtls\pk_wrap.h" />

+    <ClInclude Include="..\..\include\mbedtls\pkcs11.h" />

+    <ClInclude Include="..\..\include\mbedtls\pkcs12.h" />

+    <ClInclude Include="..\..\include\mbedtls\pkcs5.h" />

+    <ClInclude Include="..\..\include\mbedtls\platform.h" />

+    <ClInclude Include="..\..\include\mbedtls\ripemd160.h" />

+    <ClInclude Include="..\..\include\mbedtls\rsa.h" />

+    <ClInclude Include="..\..\include\mbedtls\sha1.h" />

+    <ClInclude Include="..\..\include\mbedtls\sha256.h" />

+    <ClInclude Include="..\..\include\mbedtls\sha512.h" />

+    <ClInclude Include="..\..\include\mbedtls\ssl.h" />

+    <ClInclude Include="..\..\include\mbedtls\ssl_cache.h" />

+    <ClInclude Include="..\..\include\mbedtls\ssl_ciphersuites.h" />

+    <ClInclude Include="..\..\include\mbedtls\ssl_cookie.h" />

+    <ClInclude Include="..\..\include\mbedtls\threading.h" />

+    <ClInclude Include="..\..\include\mbedtls\timing.h" />

+    <ClInclude Include="..\..\include\mbedtls\version.h" />

+    <ClInclude Include="..\..\include\mbedtls\x509.h" />

+    <ClInclude Include="..\..\include\mbedtls\x509_crl.h" />

+    <ClInclude Include="..\..\include\mbedtls\x509_crt.h" />

+    <ClInclude Include="..\..\include\mbedtls\x509_csr.h" />

+    <ClInclude Include="..\..\include\mbedtls\xtea.h" />

   </ItemGroup>

   <ItemGroup>

     <ClCompile Include="..\..\library\aes.c" />

diff --git a/visualc/VS6/mbedtls.dsp b/visualc/VS6/mbedtls.dsp
index a3c6940..59108ec 100644
--- a/visualc/VS6/mbedtls.dsp
+++ b/visualc/VS6/mbedtls.dsp
@@ -365,259 +365,259 @@
 # PROP Default_Filter "h;hpp;hxx;hm;inl"

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\aes.h

+SOURCE=..\..\include\mbedtls\aes.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\aesni.h

+SOURCE=..\..\include\mbedtls\aesni.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\arc4.h

+SOURCE=..\..\include\mbedtls\arc4.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\asn1.h

+SOURCE=..\..\include\mbedtls\asn1.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\asn1write.h

+SOURCE=..\..\include\mbedtls\asn1write.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\base64.h

+SOURCE=..\..\include\mbedtls\base64.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\bignum.h

+SOURCE=..\..\include\mbedtls\bignum.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\blowfish.h

+SOURCE=..\..\include\mbedtls\blowfish.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\bn_mul.h

+SOURCE=..\..\include\mbedtls\bn_mul.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\camellia.h

+SOURCE=..\..\include\mbedtls\camellia.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ccm.h

+SOURCE=..\..\include\mbedtls\ccm.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\certs.h

+SOURCE=..\..\include\mbedtls\certs.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\check_config.h

+SOURCE=..\..\include\mbedtls\check_config.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\cipher.h

+SOURCE=..\..\include\mbedtls\cipher.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\cipher_wrap.h

+SOURCE=..\..\include\mbedtls\cipher_wrap.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\config.h

+SOURCE=..\..\include\mbedtls\config.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ctr_drbg.h

+SOURCE=..\..\include\mbedtls\ctr_drbg.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\debug.h

+SOURCE=..\..\include\mbedtls\debug.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\des.h

+SOURCE=..\..\include\mbedtls\des.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\dhm.h

+SOURCE=..\..\include\mbedtls\dhm.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ecdh.h

+SOURCE=..\..\include\mbedtls\ecdh.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ecdsa.h

+SOURCE=..\..\include\mbedtls\ecdsa.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ecp.h

+SOURCE=..\..\include\mbedtls\ecp.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\entropy.h

+SOURCE=..\..\include\mbedtls\entropy.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\entropy_poll.h

+SOURCE=..\..\include\mbedtls\entropy_poll.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\error.h

+SOURCE=..\..\include\mbedtls\error.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\gcm.h

+SOURCE=..\..\include\mbedtls\gcm.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\havege.h

+SOURCE=..\..\include\mbedtls\havege.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\hmac_drbg.h

+SOURCE=..\..\include\mbedtls\hmac_drbg.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\md.h

+SOURCE=..\..\include\mbedtls\md.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\md2.h

+SOURCE=..\..\include\mbedtls\md2.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\md4.h

+SOURCE=..\..\include\mbedtls\md4.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\md5.h

+SOURCE=..\..\include\mbedtls\md5.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\md_wrap.h

+SOURCE=..\..\include\mbedtls\md_wrap.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\memory.h

+SOURCE=..\..\include\mbedtls\memory.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\memory_buffer_alloc.h

+SOURCE=..\..\include\mbedtls\memory_buffer_alloc.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\net.h

+SOURCE=..\..\include\mbedtls\net.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\oid.h

+SOURCE=..\..\include\mbedtls\oid.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\padlock.h

+SOURCE=..\..\include\mbedtls\padlock.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\pbkdf2.h

+SOURCE=..\..\include\mbedtls\pbkdf2.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\pem.h

+SOURCE=..\..\include\mbedtls\pem.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\pk.h

+SOURCE=..\..\include\mbedtls\pk.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\pk_wrap.h

+SOURCE=..\..\include\mbedtls\pk_wrap.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\pkcs11.h

+SOURCE=..\..\include\mbedtls\pkcs11.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\pkcs12.h

+SOURCE=..\..\include\mbedtls\pkcs12.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\pkcs5.h

+SOURCE=..\..\include\mbedtls\pkcs5.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\platform.h

+SOURCE=..\..\include\mbedtls\platform.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ripemd160.h

+SOURCE=..\..\include\mbedtls\ripemd160.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\rsa.h

+SOURCE=..\..\include\mbedtls\rsa.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\sha1.h

+SOURCE=..\..\include\mbedtls\sha1.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\sha256.h

+SOURCE=..\..\include\mbedtls\sha256.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\sha512.h

+SOURCE=..\..\include\mbedtls\sha512.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ssl.h

+SOURCE=..\..\include\mbedtls\ssl.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ssl_cache.h

+SOURCE=..\..\include\mbedtls\ssl_cache.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ssl_ciphersuites.h

+SOURCE=..\..\include\mbedtls\ssl_ciphersuites.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\ssl_cookie.h

+SOURCE=..\..\include\mbedtls\ssl_cookie.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\threading.h

+SOURCE=..\..\include\mbedtls\threading.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\timing.h

+SOURCE=..\..\include\mbedtls\timing.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\version.h

+SOURCE=..\..\include\mbedtls\version.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\x509.h

+SOURCE=..\..\include\mbedtls\x509.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\x509_crl.h

+SOURCE=..\..\include\mbedtls\x509_crl.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\x509_crt.h

+SOURCE=..\..\include\mbedtls\x509_crt.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\x509_csr.h

+SOURCE=..\..\include\mbedtls\x509_csr.h

 # End Source File

 # Begin Source File

 

-SOURCE=..\..\include\polarssl\xtea.h

+SOURCE=..\..\include\mbedtls\xtea.h

 # End Source File

 # End Group

 # End Target