diff options
author | Nicolas Boichat <drinkcat@google.com> | 2017-02-07 11:40:59 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-02-18 00:39:28 -0800 |
commit | 83bd850f3fd45648bb811f6080efac396c8a2062 (patch) | |
tree | 3e22a3c7755002b5dbe55eb0ce951afc4ab24899 /tests/gen_test_keys.sh | |
parent | 94bd5c5069e6ca0c99754f39152bd4e059968904 (diff) | |
download | vboot-83bd850f3fd45648bb811f6080efac396c8a2062.tar.gz |
vboot_reference: Add support for 2048-bit exponent 3 keysstabilize-9313.Bfirmware-cr50-release-9308.25.Bfirmware-cr50-mp-release-9308.87.Bfirmware-cr50-mp-r86-9311.70.Bfirmware-cr50-mp-9311.Bfirmware-cr50-guc-factory-9308.26.Bfirmware-cr50-9308.Bfirmware-cr50-9308.24.B
This also adds the required tests (keys, testcases).
BRANCH=none
BUG=chromium:684354
TEST=make runtests
Change-Id: I5e148f8792ea325f813d76089271f3c4bcc2935d
Reviewed-on: https://chromium-review.googlesource.com/438951
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests/gen_test_keys.sh')
-rwxr-xr-x | tests/gen_test_keys.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/gen_test_keys.sh b/tests/gen_test_keys.sh index dbb17419..04315ac3 100755 --- a/tests/gen_test_keys.sh +++ b/tests/gen_test_keys.sh @@ -25,7 +25,15 @@ function generate_keys { continue fi - openssl genrsa -F4 -out ${key_base}.pem $i + # Extract exponent from key_length name, if necessary + exp="F4" + bits=$i + if [ "${i##*_exp}" != "${i}" ]; then + exp="${i##*_exp}" + bits="${i%%_exp${exp}}" + fi + + openssl genrsa -${exp} -out ${key_base}.pem ${bits} # Generate self-signed certificate from key. openssl req -batch -new -x509 -key ${key_base}.pem \ -out ${key_base}.crt |