mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>
This commit is contained in:
parent
a2600e42f9
commit
d7b8e76f99
7 changed files with 141 additions and 23 deletions
17
g10/export.c
17
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue