tf-a-stm32mp: fix set_fip_sign_key() to obtain the key password

This commit fixes the set_fip_sign_key() function to match the new keys format
where there is a key_pass file for each key, no longer needing to search with
the key index.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
Arturo Buzarra 2024-04-02 17:53:37 +02:00
parent dfda74348e
commit 09e302d5ef
1 changed files with 2 additions and 5 deletions

View File

@ -44,12 +44,9 @@ python set_fip_sign_key() {
passfile = d.getVar('TRUSTFENCE_PASSWORD_FILE')
if (os.path.isfile(passfile)):
with open(passfile, "r") as file:
p = file.read().split()
i = int(d.getVar('TRUSTFENCE_KEY_INDEX'))
if (i > 7):
i = 0
p = file.read().strip()
if (p):
d.setVar('FIP_SIGN_KEY_PASS', p[i])
d.setVar('FIP_SIGN_KEY_PASS', p)
}
do_deploy:append() {