From f17b67c16df16e1a57a412ed67389bfe178aad16 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 4 Feb 2026 03:14:29 +0800 Subject: [PATCH] put the test key into the devkey slot i feel a little more comfortable with this because there are checks that *any* key in that slot would be treated as a devkey and would lead to key erasure. so just in case i messed up something in the other checks, this would trigger a key erasure. I think there is no way around signing at least a beta image containing the third party keys if i truly want to check all the paths, so trying to isolate what it can do is important. --- tools/src/sign_image.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/src/sign_image.rs b/tools/src/sign_image.rs index 42ea01231..4ade7e4c2 100644 --- a/tools/src/sign_image.rs +++ b/tools/src/sign_image.rs @@ -266,8 +266,8 @@ pub fn sign_image( .map_err(|e| format!("{}", e))?; let derived_public_key = sk.public_key(); - // replace first random data with the derived public key of the fake signer - header.sealed_data.pubkeys[0].pk.copy_from_slice(derived_public_key.as_ref()); + // replace devkey slot with the derived public key of the fake signer + header.sealed_data.pubkeys[3].pk.copy_from_slice(derived_public_key.as_ref()); } let mut protected = Vec::new();