Add asn1 parser of mbed-tls

This bundles the asn1 parser from mbed-tls into mcuboot, which allows
adding EC crypto (tinycrypt based) functionality for target OSes that
don't bundle mbed-tls.

Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/sim/mcuboot-sys/build.rs b/sim/mcuboot-sys/build.rs
index 1135510..ad33483 100644
--- a/sim/mcuboot-sys/build.rs
+++ b/sim/mcuboot-sys/build.rs
@@ -41,7 +41,7 @@
         conf.define("MCUBOOT_USE_TINYCRYPT", None);
 
         conf.define("MBEDTLS_CONFIG_FILE", Some("<config-boot.h>"));
-        conf.include("mbedtls/include");
+        conf.include("../../ext/mbedtls/include");
         conf.include("../../ext/tinycrypt/lib/include");
 
         conf.file("../../boot/zephyr/keys.c");
@@ -52,8 +52,7 @@
         conf.file("../../ext/tinycrypt/lib/source/ecc_dsa.c");
         conf.file("../../ext/tinycrypt/lib/source/ecc_platform_specific.c");
 
-        conf.file("mbedtls/library/bignum.c");
-        conf.file("mbedtls/library/asn1parse.c");
+        conf.file("../../ext/mbedtls/src/asn1parse.c");
     } else {
         // Neither signature type, only verify sha256.
         conf.define("MCUBOOT_USE_MBED_TLS", None);
@@ -92,6 +91,7 @@
 
     walk_dir("../../boot").unwrap();
     walk_dir("../../ext/tinycrypt/lib/source").unwrap();
+    walk_dir("../../ext/mbedtls/src").unwrap();
     walk_dir("csupport").unwrap();
     walk_dir("mbedtls/include").unwrap();
     walk_dir("mbedtls/library").unwrap();