summaryrefslogtreecommitdiff
path: root/tests/gen_test_keys.sh
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/gen_test_keys.sh
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/gen_test_keys.sh')
-rwxr-xr-xtests/gen_test_keys.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/gen_test_keys.sh b/tests/gen_test_keys.sh
index 1bf995b2..11545d22 100755
--- a/tests/gen_test_keys.sh
+++ b/tests/gen_test_keys.sh
@@ -32,7 +32,7 @@ function generate_keys {
-out ${key_base}.crt
# Generate pre-processed key for use by RSA signature verification code.
- ${UTIL_DIR}/dumpRSAPublicKey ${key_base}.crt \
+ ${UTIL_DIR}/dumpRSAPublicKey -cert ${key_base}.crt \
> ${key_base}.keyb
alg_index=0