summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLaMont Jones <lamontjones@chromium.org>2019-02-26 10:23:16 -0700
committerMike Frysinger <vapier@chromium.org>2019-02-26 21:45:31 +0000
commitc9a9d3c6fbf7dcc2eb76422988cecfbed076e47e (patch)
treefcdd22b1079cdeb3d4f09055979403aa23ef050c /scripts
parent9d6dc0d222418f90f5080f6c25cd06ca14abf48b (diff)
downloadvboot-c9a9d3c6fbf7dcc2eb76422988cecfbed076e47e.tar.gz
Use futility to get the key size, rather than openssl.
Openssl output format changed, use futility for key_size. BUG=chromium:935628 TEST=None BRANCH=none Change-Id: I1329fa8cd1a79943dbcd8be19d56680ae22376f1 Reviewed-on: https://chromium-review.googlesource.com/c/1489452 Tested-by: LaMont Jones <lamontjones@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/image_signing/sign_official_build.sh6
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}" | \