From 1e609737b4c0e0b191f80e7a152cae36c4afaa09 Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Tue, 2 Jun 2009 11:43:37 +0100 Subject: [PATCH] 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. --- onak.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 { -- 2.39.5