Update sim to run ecdsa sig + kw enc
This adds the functionality to build/run testing on images that were
signed using ECDSA and encrypted with KW, using tinycrypt.
Also when it this mode, ecdsa+kw, adds the Mbed-TLS submodule to the
build because the simulator needs to use the Mbed-TLS keywrapping
infrastructure to generate the keys sent to the image.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/sim/src/lib.rs b/sim/src/lib.rs
index 629b916..0fc9363 100644
--- a/sim/src/lib.rs
+++ b/sim/src/lib.rs
@@ -1196,6 +1196,13 @@
}
#[cfg(feature = "sig-ecdsa")]
+#[cfg(feature = "enc-kw")]
+fn make_tlv() -> TlvGen {
+ TlvGen::new_ecdsa_kw()
+}
+
+#[cfg(feature = "sig-ecdsa")]
+#[cfg(not(feature = "enc-kw"))]
fn make_tlv() -> TlvGen {
TlvGen::new_ecdsa()
}
@@ -1213,6 +1220,7 @@
}
#[cfg(not(feature = "sig-rsa"))]
+#[cfg(not(feature = "sig-ecdsa"))]
#[cfg(feature = "enc-kw")]
fn make_tlv() -> TlvGen {
TlvGen::new_enc_kw()