diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-12-29 14:16:05 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-12-29 14:16:05 +0000 |
commit | 4299c7b84f15c201e8df69f3a7cb1eefe4da6237 (patch) | |
tree | 02a8c7b4aff645143ce4d677fc225ea123ee88a7 /usr.bin/signify/signify.c | |
parent | d97ba7c30eb5559f8bc676a7f6eb22b6db8d8ce8 (diff) |
remove the inspect debug command. should not be used by users, who are not
supposed to know what fingerprints are or that they exist.
Diffstat (limited to 'usr.bin/signify/signify.c')
-rw-r--r-- | usr.bin/signify/signify.c | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c index 614d49ae41a..f8faad5c2c0 100644 --- a/usr.bin/signify/signify.c +++ b/usr.bin/signify/signify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signify.c,v 1.92 2014/11/20 14:51:42 krw Exp $ */ +/* $OpenBSD: signify.c,v 1.93 2014/12/29 14:16:04 tedu Exp $ */ /* * Copyright (c) 2013 Ted Unangst <tedu@openbsd.org> * @@ -82,7 +82,6 @@ usage(const char *error) #ifndef VERIFYONLY "\t%1$s -C [-q] -p pubkey -x sigfile [file ...]\n" "\t%1$s -G [-n] [-c comment] -p pubkey -s seckey\n" - "\t%1$s -I [-p pubkey] [-s seckey] [-x sigfile]\n" "\t%1$s -S [-e] [-x sigfile] -s seckey -m message\n" #endif "\t%1$s -V [-eq] [-x sigfile] -p pubkey -m message\n", @@ -398,31 +397,6 @@ sign(const char *seckeyfile, const char *msgfile, const char *sigfile, free(msg); } - -static void -inspect(const char *seckeyfile, const char *pubkeyfile, const char *sigfile) -{ - struct sig sig; - struct enckey enckey; - struct pubkey pubkey; - char fp[(FPLEN + 2) / 3 * 4 + 1]; - - if (seckeyfile) { - readb64file(seckeyfile, &enckey, sizeof(enckey), NULL); - b64_ntop(enckey.fingerprint, FPLEN, fp, sizeof(fp)); - printf("sec fp: %s\n", fp); - } - if (pubkeyfile) { - readb64file(pubkeyfile, &pubkey, sizeof(pubkey), NULL); - b64_ntop(pubkey.fingerprint, FPLEN, fp, sizeof(fp)); - printf("pub fp: %s\n", fp); - } - if (sigfile) { - readb64file(sigfile, &sig, sizeof(sig), NULL); - b64_ntop(sig.fingerprint, FPLEN, fp, sizeof(fp)); - printf("sig fp: %s\n", fp); - } -} #endif static void @@ -684,7 +658,6 @@ main(int argc, char **argv) NONE, CHECK, GENERATE, - INSPECT, SIGN, VERIFY } verb = NONE; @@ -692,7 +665,7 @@ main(int argc, char **argv) rounds = 42; - while ((ch = getopt(argc, argv, "CGISVc:em:np:qs:x:")) != -1) { + while ((ch = getopt(argc, argv, "CGSVc:em:np:qs:x:")) != -1) { switch (ch) { #ifndef VERIFYONLY case 'C': @@ -705,11 +678,6 @@ main(int argc, char **argv) usage(NULL); verb = GENERATE; break; - case 'I': - if (verb) - usage(NULL); - verb = INSPECT; - break; case 'S': if (verb) usage(NULL); @@ -782,9 +750,6 @@ main(int argc, char **argv) usage("must specify pubkey and seckey"); generate(pubkeyfile, seckeyfile, rounds, comment); break; - case INSPECT: - inspect(seckeyfile, pubkeyfile, sigfile); - break; case SIGN: if (!msgfile || !seckeyfile) usage("must specify message and seckey"); |