Fix overwrite-only encrypted images in sim
Also add overwrite-only + encrypted tests to travis-ci.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/.travis.yml b/.travis.yml
index 54e0bd2..813e0b7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,6 +23,8 @@
env: MULTI_FEATURES="sig-rsa overwrite-only,sig-ecdsa overwrite-only"
- os: linux
env: MULTI_FEATURES="sig-rsa validate-slot0,sig-ecdsa validate-slot0"
+ - os: linux
+ env: MULTI_FEATURES="enc-kw overwrite-only,enc-rsa overwrite-only"
# FIXME: this test actually fails and must be fixed
#- os: linux
diff --git a/sim/src/lib.rs b/sim/src/lib.rs
index e7ad671..47d20eb 100644
--- a/sim/src/lib.rs
+++ b/sim/src/lib.rs
@@ -695,11 +695,13 @@
}
#[cfg(feature = "enc-rsa")]
+ #[cfg(not(feature = "overwrite-only"))]
fn status_sz(&self) -> usize {
self.trailer_sz() - (16 + 24 + 32)
}
#[cfg(feature = "enc-kw")]
+ #[cfg(not(feature = "overwrite-only"))]
fn status_sz(&self) -> usize {
self.trailer_sz() - (16 + 24 + 32)
}