-.\" $OpenBSD: signify.1,v 1.27 2014/08/07 19:03:38 lteo Exp $
+.\" $OpenBSD: signify.1,v 1.28 2014/12/29 14:16:04 tedu Exp $
.\"
.\"Copyright (c) 2013 Marc Espie <espie@openbsd.org>
.\"Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
.\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.Dd $Mdocdate: August 7 2014 $
+.Dd $Mdocdate: December 29 2014 $
.Dt SIGNIFY 1
.Os
.Sh NAME
.Fl p Ar pubkey
.Fl s Ar seckey
.Nm signify
-.Fl I
-.Op Fl p Ar pubkey
-.Op Fl s Ar seckey
-.Op Fl x Ar sigfile
-.Nm signify
.Fl S
.Op Fl e
.Op Fl x Ar sigfile
.Xr sha256 1 .
.It Fl G
Generate a new key pair.
-.It Fl I
-Inspect the specified keys or signature and print their fingerprint.
.It Fl S
Sign the specified message file and create a signature.
.It Fl V
-/* $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>
*
#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",
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
NONE,
CHECK,
GENERATE,
- INSPECT,
SIGN,
VERIFY
} verb = NONE;
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':
usage(NULL);
verb = GENERATE;
break;
- case 'I':
- if (verb)
- usage(NULL);
- verb = INSPECT;
- break;
case 'S':
if (verb)
usage(NULL);
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");