summaryrefslogtreecommitdiff
path: root/tests/devkeys
diff options
context:
space:
mode:
authorGaurav Shah <gauravsh@chromium.org>2010-11-01 13:33:32 -0700
committerGaurav Shah <gauravsh@chromium.org>2010-11-01 13:33:32 -0700
commit551037b10e427687b7115751c7d613d66459c427 (patch)
tree00995e8df8e8570cc5a19d6c077ffd05772e8e21 /tests/devkeys
parenta98ad7aa247caf2eea820238d174c147d08f99bc (diff)
downloadvboot-551037b10e427687b7115751c7d613d66459c427.tar.gz
Make dumpRSAPublicKey also accept a public key in PEM format
This change makes dumpRSAPublicKey directly accept a public key in PEM format. This makes it possible to avoid the unnecessary step of generating a self-signed certificate to dump the public key in .keyb format. The old style certificate input is still accepted. Using certs (as done previously): dumpRSAPublicKey -cert <certfile> Directly using public keys: dumpRSAPublicKey -pub <pubfile> Change-Id: Ic35b59aff6613d145d7947212650da281f734b74 BUG=7576 TEST=manual $ openssl genrsa -F4 -out test.pem 4096 $ openssl rsa -in test.pem -out test.pub $ dumpRSAPublicKey -pub test.pub >test.pub.keyb Verify that this matches the output we get using the old style <cert> input. $ openssl req -batch -new -x509 -key test.pem -out test.cert $ dumpRSAPublicKey -cert test.cert >test.cert.keyb $ diff test.pub.keyb test.cert.keyb $ Review URL: http://codereview.chromium.org/4215006
Diffstat (limited to 'tests/devkeys')
-rwxr-xr-xtests/devkeys/create_new_keys.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/devkeys/create_new_keys.sh b/tests/devkeys/create_new_keys.sh
index 6faba532..625fbc6c 100755
--- a/tests/devkeys/create_new_keys.sh
+++ b/tests/devkeys/create_new_keys.sh
@@ -42,7 +42,7 @@ function make_pair {
openssl req -batch -new -x509 -key "${base}_${len}.pem" \
-out "${base}_${len}.crt"
# generate pre-processed RSA public key
- dumpRSAPublicKey "${base}_${len}.crt" > "${base}_${len}.keyb"
+ dumpRSAPublicKey -cert "${base}_${len}.crt" > "${base}_${len}.keyb"
# wrap the public key
vbutil_key \