sim: allow generation of non-signed + encrypted EC images
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/sim/src/image.rs b/sim/src/image.rs
index b7f8ed6..fe97f12 100644
--- a/sim/src/image.rs
+++ b/sim/src/image.rs
@@ -1267,8 +1267,11 @@
TlvGen::new_enc_rsa()
}
} else if Caps::EncEc256.present() {
- //FIXME: should fail with RSA signature?
- TlvGen::new_ecdsa_ecies_p256()
+ if Caps::EcdsaP256.present() {
+ TlvGen::new_ecdsa_ecies_p256()
+ } else {
+ TlvGen::new_ecies_p256()
+ }
} else {
// The non-encrypted configuration.
if Caps::RSA2048.present() {