Rename include directory to mbedtls
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>