summaryrefslogtreecommitdiffstats
path: root/g10/export.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-10-08 15:04:45 +0200
committerWerner Koch <wk@gnupg.org>2015-10-08 15:40:53 +0200
commitd7b8e76f9930750d669405dee3108c9bc8e87b91 (patch)
tree33752ea1c1a0ced1c8582f624611138afa16b8b9 /g10/export.c
parentFix two unused/possible-uninitialized var warnings. (diff)
downloadgnupg2-d7b8e76f9930750d669405dee3108c9bc8e87b91.tar.xz
gnupg2-d7b8e76f9930750d669405dee3108c9bc8e87b91.zip
gpg: Add option --print-dane-records.
* g10/options.h (opt): Add field "print_dane_records". * g10/gpg.c (oPrintDANERecords): new. (opts): Add --print-dane-records. (main): Set that option. * g10/export.c (do_export): Remove EXPORT_DANE_FORMAT handling. (do_export_stream): Add EXPORT_DANE_FORMAT handling. * g10/keylist.c (list_keyblock_pka): Implement DANE record printing. * g10/gpgv.c (export_pubkey_buffer): New stub. * g10/test-stubs.c (export_pubkey_buffer): New stub. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/export.c')
-rw-r--r--g10/export.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/g10/export.c b/g10/export.c
index 94a325629..2e9e61c69 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -198,15 +198,11 @@ do_export (ctrl_t ctrl, strlist_t users, int secret, unsigned int options )
if (rc)
return rc;
- /* We don't want an Armor for DANE format. */
- if (!(options & EXPORT_DANE_FORMAT))
+ if ( opt.armor )
{
- if ( opt.armor )
- {
- afx = new_armor_context ();
- afx->what = secret? 5 : 1;
- push_armor_filter (afx, out);
- }
+ afx = new_armor_context ();
+ afx->what = secret? 5 : 1;
+ push_armor_filter (afx, out);
}
rc = do_export_stream (ctrl, out, users, secret, NULL, options, &any );
@@ -776,6 +772,11 @@ do_export_stream (ctrl_t ctrl, iobuf_t out, strlist_t users, int secret,
init_packet (&pkt);
kdbhd = keydb_new ();
+ /* For the DANE format override the options. */
+ if ((options & EXPORT_DANE_FORMAT))
+ options = (EXPORT_DANE_FORMAT | EXPORT_MINIMAL | EXPORT_CLEAN);
+
+
if (!users)
{
ndesc = 1;