From: Jonathan McDowell Date: Tue, 2 Jun 2009 10:43:37 +0000 (+0100) Subject: Obey binary flag for "onak get" X-Git-Tag: 0.3.7~1 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=1e609737b4c0e0b191f80e7a152cae36c4afaa09;p=onak.git 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 {