From: Jonathan McDowell Date: Tue, 2 Jun 2009 10:43:37 +0000 (+0100) Subject: Obey binary flag for "onak get" X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/commitdiff_plain/1e609737b4c0e0b191f80e7a152cae36c4afaa09?ds=inline;hp=e9e09c3dc07b0fc2ebf615a79d93b2e6bcdb1077 Obey binary flag for "onak get" We accepted -b for "onak add" to read in a binary key, but always output keys ASCII armoured; obey -b for get as well and return the raw key data. --- diff --git a/onak.c b/onak.c index 3a6f62f..30f7710 100644 --- a/onak.c +++ b/onak.c @@ -322,9 +322,15 @@ int main(int argc, char *argv[]) &packets, &list_end); free_publickey(keys); - armor_openpgp_stream(stdout_putchar, + if (binary) { + write_openpgp_stream(stdout_putchar, NULL, packets); + } else { + armor_openpgp_stream(stdout_putchar, + NULL, + packets); + } free_packet_list(packets); packets = NULL; } else {