core_sign_update: use version 2 if only 1 key is provided

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Mathieu Tortuyaux 2023-12-15 10:10:28 +01:00
parent 0ba64271c4
commit f37db1f3b1
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8

View File

@ -163,8 +163,13 @@ delta_generator --signature_file ${files} --in_file update --out_file update.sig
i=1
for key in "${public_keys[@]}"; do
version="${i}"
if [ ${#public_keys[@]} == 1 ]; then
version=2
fi
delta_generator \
--public_key_version "${i}" \
--public_key_version "${version}" \
--public_key "${key}" \
--in_file update.signed