summaryrefslogtreecommitdiff
path: root/utility/dumpRSAPublicKey.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-02-03 17:07:15 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-03-10 20:44:43 +0000
commit4e4c19602edf3834b50d66d3ba067e895aca6fa0 (patch)
tree11b9408e5e6a9c3e3fde95c21656e67562bb3faf /utility/dumpRSAPublicKey.c
parent26af0da4f7e0fd5cc9410011ca05ff6539bbf42d (diff)
downloadvboot-4e4c19602edf3834b50d66d3ba067e895aca6fa0.tar.gz
futility: Add create command to make keypairs from RSA files
This command reads a single .pem file and emits the public and private keys generated from it. It can produce both the old-style vboot 1.0 keys (.vbpubk and .vbprivk), or the new vboot 2.1 format keys (.vbpubk2 and .vbprik2). The default is the new format, but you can give futility the --vb1 arg to force the old format. A test is included. BUG=chromium:231547 BRANCH=ToT TEST=make runtests Change-Id: I4713dc5bf34151052870f88ba52ddccf9d4dab50 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/246766 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'utility/dumpRSAPublicKey.c')
-rw-r--r--utility/dumpRSAPublicKey.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/utility/dumpRSAPublicKey.c b/utility/dumpRSAPublicKey.c
index 113e9a0b..e97fa027 100644
--- a/utility/dumpRSAPublicKey.c
+++ b/utility/dumpRSAPublicKey.c
@@ -8,11 +8,10 @@
* /tools/DumpPublicKey.java). Uses the OpenSSL X509 and BIGNUM library.
*/
-#include <stdint.h>
-#include <openssl/bn.h>
-#include <openssl/evp.h>
+#define OPENSSL_NO_SHA
#include <openssl/pem.h>
-#include <openssl/x509.h>
+
+#include <stdint.h>
#include <string.h>
#include <unistd.h>