summaryrefslogtreecommitdiff
path: root/usr.bin/signify
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2016-09-27 02:02:48 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2016-09-27 02:02:48 +0000
commit048bdf675b278c3add18659bb7501c9dd7e67d48 (patch)
treee49b7a9075d6b79206618e27f2df06d68b7fbab1 /usr.bin/signify
parentb661603c48a7b16f20a05e49baae910b352b3a0e (diff)
no need to copy keypath if we already have one
Diffstat (limited to 'usr.bin/signify')
-rw-r--r--usr.bin/signify/signify.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c
index e8289bc2f43..df96efb92ae 100644
--- a/usr.bin/signify/signify.c
+++ b/usr.bin/signify/signify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signify.c,v 1.120 2016/09/26 21:47:54 tedu Exp $ */
+/* $OpenBSD: signify.c,v 1.121 2016/09/27 02:02:47 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -488,14 +488,11 @@ readpubkey(const char *pubkeyfile, struct pubkey *pubkey,
if (snprintf(keypath, sizeof(keypath), "%s/%s",
safepath, pubkeyfile) >= sizeof(keypath))
errx(1, "name too long %s", pubkeyfile);
+ pubkeyfile = keypath;
} else
usage("must specify pubkey");
- } else {
- if (strlcpy(keypath, pubkeyfile, sizeof(keypath)) >=
- sizeof(keypath))
- errx(1, "name too long %s", pubkeyfile);
}
- readb64file(keypath, pubkey, sizeof(*pubkey), NULL);
+ readb64file(pubkeyfile, pubkey, sizeof(*pubkey), NULL);
}
static void