X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/41c69dd1e5d7a3ff7543f9848bb2de9236528243..97b2d68b9debdeaec828c9000bcca60a4a3d5817:/onak.c?ds=inline diff --git a/onak.c b/onak.c index 220483d..bba213b 100644 --- a/onak.c +++ b/onak.c @@ -6,6 +6,8 @@ * Jonathan McDowell * * Copyright 2002 Project Purple + * + * $Id: onak.c,v 1.14 2003/06/07 13:37:33 noodles Exp $ */ #include @@ -191,11 +193,15 @@ int main(int argc, char *argv[]) } else if (!strcmp("delete", argv[optind])) { delete_key(getfullkeyid(keyid), false); } else if (!strcmp("get", argv[optind])) { - if (fetch_key(keyid, &keys, false)) { + if (!ishex) { + puts("Can't get a key on uid text." + " You must supply a keyid."); + } else if (fetch_key(keyid, &keys, false)) { logthing(LOGTHING_INFO, "Got key."); flatten_publickey(keys, &packets, &list_end); + free_publickey(keys); armor_openpgp_stream(stdout_putchar, NULL, packets);