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