diff --git a/avbroot/src/cli/avb.rs b/avbroot/src/cli/avb.rs index 71a2195..aea0084 100644 --- a/avbroot/src/cli/avb.rs +++ b/avbroot/src/cli/avb.rs @@ -398,7 +398,9 @@ fn sign_or_clear(info: &mut AvbInfo, orig_header: &Header, key_group: &KeyGroup) RsaSigningKey::Internal(private_key) }; - info.header.set_algo_for_key(&signing_key)?; + info.header + .set_algo_for_key(&signing_key) + .context("Failed to set signature algorithm")?; info.header .sign(&signing_key) .context("Failed to sign new AVB header")?; diff --git a/avbroot/src/cli/ota.rs b/avbroot/src/cli/ota.rs index 37da545..a4e2846 100644 --- a/avbroot/src/cli/ota.rs +++ b/avbroot/src/cli/ota.rs @@ -593,7 +593,9 @@ fn update_vbmeta_headers( // have no dependencies and are only being processed to ensure that the // flags are set to a sane value. if parent_header != &orig_parent_header { - parent_header.set_algo_for_key(key)?; + parent_header + .set_algo_for_key(key) + .with_context(|| format!("Failed to set signature algorithm: {name}"))?; parent_header .sign(key) .with_context(|| format!("Failed to sign vbmeta header for image: {name}"))?;