summaryrefslogtreecommitdiff
path: root/utility/dumpRSAPublicKey.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-03-07 12:54:29 -0800
committerChromeBot <chrome-bot@google.com>2013-03-11 08:38:46 -0700
commitfeb2518166b1cd181e607c611cbb610f0c7300da (patch)
tree33a22857fad5a1f2246caf064b3b4eec8867e00f /utility/dumpRSAPublicKey.c
parent5fed2a667096341160db8643a4a057e328953a1d (diff)
downloadvboot-factory-spring-3842.B.tar.gz
Wrap all vboot utilities with futility.firmware-spring-3833.Bfactory-spring-3842.B
This moves all the old userspace utilities generated by vboot_reference into a subdirectory not in $PATH, and replaces them with symlinks to a single executable named 'futility'. At the moment that utility just execs the original utilities (optionally logging that fact first). Ultimately, the old utilities will be subsumed into a single binary instead of multiple separate executables. There is a matching CL needed to make the recovery image creation work. BUG=chromium-os:37062 BRANCH=none CQ-DEPEND=CL:44864 TEST=auto To test, build everything, test everything. It should work as before in all cases. I have built normal images, test images, factory installers, recovery images; they all seem to work. I've run trybots on daisy-paladin link-paladin lumpy-paladin and alex-paladin. Change-Id: Ie93db676f2ed2a64e4b13b3b5dc6b65a77db0f8c Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/44871 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'utility/dumpRSAPublicKey.c')
-rw-r--r--utility/dumpRSAPublicKey.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/utility/dumpRSAPublicKey.c b/utility/dumpRSAPublicKey.c
index da8597af..113e9a0b 100644
--- a/utility/dumpRSAPublicKey.c
+++ b/utility/dumpRSAPublicKey.c
@@ -141,9 +141,15 @@ int main(int argc, char* argv[]) {
X509* cert = NULL;
RSA* pubkey = NULL;
EVP_PKEY* key;
+ char *progname;
if (argc != 3 || (strcmp(argv[1], "-cert") && strcmp(argv[1], "-pub"))) {
- fprintf(stderr, "Usage: %s <-cert | -pub> <file>\n", argv[0]);
+ progname = strrchr(argv[0], '/');
+ if (progname)
+ progname++;
+ else
+ progname = argv[0];
+ fprintf(stderr, "Usage: %s <-cert | -pub> <file>\n", progname);
return -1;
}