summaryrefslogtreecommitdiff
path: root/test/vboot/vboot_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/vboot/vboot_test.sh')
-rwxr-xr-xtest/vboot/vboot_test.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/vboot/vboot_test.sh b/test/vboot/vboot_test.sh
index 8074fc6..6d7abb8 100755
--- a/test/vboot/vboot_test.sh
+++ b/test/vboot/vboot_test.sh
@@ -54,8 +54,16 @@ echo ${mkimage} -D "${dtc}"
echo "Build keys"
mkdir -p ${keys}
+PUBLIC_EXPONENT=${1}
+
+if [ -z "${PUBLIC_EXPONENT}" ]; then
+ PUBLIC_EXPONENT=65537
+fi
+
# Create an RSA key pair
-openssl genrsa -F4 -out ${keys}/dev.key 2048 2>/dev/null
+openssl genpkey -algorithm RSA -out ${keys}/dev.key \
+ -pkeyopt rsa_keygen_bits:2048 \
+ -pkeyopt rsa_keygen_pubexp:${PUBLIC_EXPONENT} 2>/dev/null
# Create a certificate containing the public key
openssl req -batch -new -x509 -key ${keys}/dev.key -out ${keys}/dev.crt