diff options
-rwxr-xr-x | scripts/image_signing/sign_official_build.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh index e2b0ce1c..80ac6702 100755 --- a/scripts/image_signing/sign_official_build.sh +++ b/scripts/image_signing/sign_official_build.sh @@ -478,11 +478,11 @@ sign_update_payload() { [8192]=10 ) - key_size=$(openssl rsa -text -noout -in "${key_file}" | \ - sed -n -r '1{s/Private-Key: \(([0-9]*) bit\)/\1/p}') + output=$(futility show "${key_file}") + key_size=$(echo "${output}" | sed -n '/Key length/s/[^0-9]*//p') algo=${algos[${key_size}]} if [[ -z ${algo} ]]; then - die "Unknown algorithm specified by key_size=${key_size}" + die "Unknown algorithm: futility output=${output}" fi pad_digest_utility ${algo} "${image}" | \ |