Update mbedtls submodule to 2.12.0

This also updates the RSA test to add extra build files for zeroize, and
updates to new calloc/free configuration style.

Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/sim/mcuboot-sys/build.rs b/sim/mcuboot-sys/build.rs
index a0c747c..2c28dbb 100644
--- a/sim/mcuboot-sys/build.rs
+++ b/sim/mcuboot-sys/build.rs
@@ -40,6 +40,8 @@
 
         conf.file("mbedtls/library/rsa.c");
         conf.file("mbedtls/library/bignum.c");
+        conf.file("mbedtls/library/platform.c");
+        conf.file("mbedtls/library/platform_util.c");
         conf.file("mbedtls/library/asn1parse.c");
     } else if sig_ecdsa {
         conf.define("MCUBOOT_SIGN_EC256", None);
diff --git a/sim/mcuboot-sys/csupport/run.c b/sim/mcuboot-sys/csupport/run.c
index 2882daf..8891c17 100644
--- a/sim/mcuboot-sys/csupport/run.c
+++ b/sim/mcuboot-sys/csupport/run.c
@@ -66,16 +66,19 @@
 
 static struct area_desc *flash_areas;
 
-void *(*mbedtls_calloc)(size_t n, size_t size);
-void (*mbedtls_free)(void *ptr);
+#ifdef MCUBOOT_SIGN_RSA
+int mbedtls_platform_set_calloc_free(void * (*calloc_func)(size_t, size_t),
+                                     void (*free_func)(void *));
+#endif
 
 int invoke_boot_go(struct area_desc *adesc)
 {
     int res;
     struct boot_rsp rsp;
 
-    mbedtls_calloc = calloc;
-    mbedtls_free = free;
+#ifdef MCUBOOT_SIGN_RSA
+    mbedtls_platform_set_calloc_free(calloc, free);
+#endif
 
     flash_areas = adesc;
     if (setjmp(boot_jmpbuf) == 0) {
diff --git a/sim/mcuboot-sys/mbedtls b/sim/mcuboot-sys/mbedtls
index 32605dc..6c34268 160000
--- a/sim/mcuboot-sys/mbedtls
+++ b/sim/mcuboot-sys/mbedtls
@@ -1 +1 @@
-Subproject commit 32605dc83042d737e715a685e53176388d73540e
+Subproject commit 6c34268e203d23bbfbfda3f7362dac8b9b9382bc