Rename ext/mbedtls to ext/mbedtls-asn1

The ext/mbedtls directory has a copy of the ASN.1 parser from the mbed
TLS library.  To allow a future change to bring the entire mbed TLS
library in as a submodule under ext, rename this to mbedtls-asn1 to make
it clear this is only a subset.

Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/boot/bootutil/pkg.yml b/boot/bootutil/pkg.yml
index 506bfcf..310b83b 100644
--- a/boot/bootutil/pkg.yml
+++ b/boot/bootutil/pkg.yml
@@ -46,7 +46,7 @@
 
 pkg.deps.BOOTUTIL_USE_TINYCRYPT:
     - "@mcuboot/ext/tinycrypt/lib"
-    - "@mcuboot/ext/mbedtls"
+    - "@mcuboot/ext/mbedtls-asn1"
 
 pkg.deps.BOOTUTIL_SIGN_ED25519:
     - "@apache-mynewt-core/crypto/mbedtls"
diff --git a/boot/zephyr/CMakeLists.txt b/boot/zephyr/CMakeLists.txt
index ded117d..f5e02c7 100644
--- a/boot/zephyr/CMakeLists.txt
+++ b/boot/zephyr/CMakeLists.txt
@@ -66,7 +66,7 @@
 set(FIAT_DIR "${MCUBOOT_DIR}/ext/fiat")
 assert_exists(FIAT_DIR)
 # Path to mbed-tls' asn1 parser library.
-set(MBEDTLS_ASN1_DIR "${MCUBOOT_DIR}/ext/mbedtls")
+set(MBEDTLS_ASN1_DIR "${MCUBOOT_DIR}/ext/mbedtls-asn1")
 assert_exists(MBEDTLS_ASN1_DIR)
 set(NRF_DIR "${MCUBOOT_DIR}/ext/nrf")
 
diff --git a/ext/mbedtls/README b/ext/mbedtls-asn1/README
similarity index 100%
rename from ext/mbedtls/README
rename to ext/mbedtls-asn1/README
diff --git a/ext/mbedtls/include/mbedtls/asn1.h b/ext/mbedtls-asn1/include/mbedtls/asn1.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/asn1.h
rename to ext/mbedtls-asn1/include/mbedtls/asn1.h
diff --git a/ext/mbedtls/include/mbedtls/bignum.h b/ext/mbedtls-asn1/include/mbedtls/bignum.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/bignum.h
rename to ext/mbedtls-asn1/include/mbedtls/bignum.h
diff --git a/ext/mbedtls/include/mbedtls/check_config.h b/ext/mbedtls-asn1/include/mbedtls/check_config.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/check_config.h
rename to ext/mbedtls-asn1/include/mbedtls/check_config.h
diff --git a/ext/mbedtls/include/mbedtls/config.h b/ext/mbedtls-asn1/include/mbedtls/config.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/config.h
rename to ext/mbedtls-asn1/include/mbedtls/config.h
diff --git a/ext/mbedtls/include/mbedtls/ecdsa.h b/ext/mbedtls-asn1/include/mbedtls/ecdsa.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/ecdsa.h
rename to ext/mbedtls-asn1/include/mbedtls/ecdsa.h
diff --git a/ext/mbedtls/include/mbedtls/ecp.h b/ext/mbedtls-asn1/include/mbedtls/ecp.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/ecp.h
rename to ext/mbedtls-asn1/include/mbedtls/ecp.h
diff --git a/ext/mbedtls/include/mbedtls/md.h b/ext/mbedtls-asn1/include/mbedtls/md.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/md.h
rename to ext/mbedtls-asn1/include/mbedtls/md.h
diff --git a/ext/mbedtls/include/mbedtls/oid.h b/ext/mbedtls-asn1/include/mbedtls/oid.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/oid.h
rename to ext/mbedtls-asn1/include/mbedtls/oid.h
diff --git a/ext/mbedtls/include/mbedtls/pk.h b/ext/mbedtls-asn1/include/mbedtls/pk.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/pk.h
rename to ext/mbedtls-asn1/include/mbedtls/pk.h
diff --git a/ext/mbedtls/include/mbedtls/platform.h b/ext/mbedtls-asn1/include/mbedtls/platform.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/platform.h
rename to ext/mbedtls-asn1/include/mbedtls/platform.h
diff --git a/ext/mbedtls/include/mbedtls/platform_util.h b/ext/mbedtls-asn1/include/mbedtls/platform_util.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/platform_util.h
rename to ext/mbedtls-asn1/include/mbedtls/platform_util.h
diff --git a/ext/mbedtls/include/mbedtls/threading.h b/ext/mbedtls-asn1/include/mbedtls/threading.h
similarity index 100%
rename from ext/mbedtls/include/mbedtls/threading.h
rename to ext/mbedtls-asn1/include/mbedtls/threading.h
diff --git a/ext/mbedtls/pkg.yml b/ext/mbedtls-asn1/pkg.yml
similarity index 96%
rename from ext/mbedtls/pkg.yml
rename to ext/mbedtls-asn1/pkg.yml
index 5e8b467..148f9c7 100644
--- a/ext/mbedtls/pkg.yml
+++ b/ext/mbedtls-asn1/pkg.yml
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-pkg.name: ext/mbedtls
+pkg.name: ext/mbedtls-asn1
 pkg.description: "MCUboot's bundled mbed-tls ASN1 parser"
 pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
 pkg.homepage: "http://mynewt.apache.org/"
diff --git a/ext/mbedtls/src/asn1parse.c b/ext/mbedtls-asn1/src/asn1parse.c
similarity index 100%
rename from ext/mbedtls/src/asn1parse.c
rename to ext/mbedtls-asn1/src/asn1parse.c
diff --git a/ext/mbedtls/src/platform_util.c b/ext/mbedtls-asn1/src/platform_util.c
similarity index 100%
rename from ext/mbedtls/src/platform_util.c
rename to ext/mbedtls-asn1/src/platform_util.c
diff --git a/sim/mcuboot-sys/build.rs b/sim/mcuboot-sys/build.rs
index 922219f..7c1db9e 100644
--- a/sim/mcuboot-sys/build.rs
+++ b/sim/mcuboot-sys/build.rs
@@ -70,7 +70,7 @@
         conf.define("MCUBOOT_USE_TINYCRYPT", None);
 
         if !enc_kw {
-            conf.include("../../ext/mbedtls/include");
+            conf.include("../../ext/mbedtls-asn1/include");
         }
         conf.include("../../ext/tinycrypt/lib/include");
 
@@ -82,8 +82,8 @@
         conf.file("../../ext/tinycrypt/lib/source/ecc_dsa.c");
         conf.file("../../ext/tinycrypt/lib/source/ecc_platform_specific.c");
 
-        conf.file("../../ext/mbedtls/src/platform_util.c");
-        conf.file("../../ext/mbedtls/src/asn1parse.c");
+        conf.file("../../ext/mbedtls-asn1/src/platform_util.c");
+        conf.file("../../ext/mbedtls-asn1/src/asn1parse.c");
     } else if sig_ed25519 {
         conf.define("MCUBOOT_SIGN_ED25519", None);
         conf.define("MCUBOOT_USE_MBED_TLS", None);
@@ -208,7 +208,7 @@
 
     walk_dir("../../boot").unwrap();
     walk_dir("../../ext/tinycrypt/lib/source").unwrap();
-    walk_dir("../../ext/mbedtls").unwrap();
+    walk_dir("../../ext/mbedtls-asn1").unwrap();
     walk_dir("csupport").unwrap();
     walk_dir("mbedtls/include").unwrap();
     walk_dir("mbedtls/library").unwrap();