Add rsa+kw testing support to simulator
Allows simulating images signed with RSA-2048 and encrypted with
AES-128-KW.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/sim/mcuboot-sys/build.rs b/sim/mcuboot-sys/build.rs
index c827623..c959bb2 100644
--- a/sim/mcuboot-sys/build.rs
+++ b/sim/mcuboot-sys/build.rs
@@ -115,7 +115,9 @@
conf.file("mbedtls/library/aes.c");
}
- if sig_rsa || enc_rsa {
+ if sig_rsa && enc_kw {
+ conf.define("MBEDTLS_CONFIG_FILE", Some("<config-rsa-kw.h>"));
+ } else if sig_rsa || enc_rsa {
conf.define("MBEDTLS_CONFIG_FILE", Some("<config-rsa.h>"));
} else if sig_ecdsa {
conf.define("MBEDTLS_CONFIG_FILE", Some("<config-asn1.h>"));