From 9b075575cdc5851b019aed5ca5d5e18416beec8e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 12 Jul 2016 15:09:18 +0200 Subject: gpg: Extend import-option import-export to print PKA or DANE. * g10/export.c (do_export_stream): Move PKA and DANE printing helper code to ... (print_pka_or_dane_records): this fucntion. (write_keyblock_to_output): Add arg OPTIOSN and call print_pka_or_dane_records if requested. -- It is now possible to print a DANE record given a a file with a key without importing the key first: gpg --export-options export-dane \ --import-options import-export \ --import-filter keep-uid='mbox =~ alpha' \ --import FILE_WITH_KEY Using the filter we only print a user id with the substring "alpha" in the addr-spec. Signed-off-by: Werner Koch --- g10/main.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'g10/main.h') diff --git a/g10/main.h b/g10/main.h index 92a26a7ed..0956f6693 100644 --- a/g10/main.h +++ b/g10/main.h @@ -400,7 +400,8 @@ gpg_error_t receive_seckey_from_agent (ctrl_t ctrl, gcry_cipher_hd_t cipherhd, const char *hexgrip, PKT_public_key *pk); -gpg_error_t write_keyblock_to_output (kbnode_t keyblock, int with_armor); +gpg_error_t write_keyblock_to_output (kbnode_t keyblock, + int with_armor, unsigned int options); gpg_error_t export_ssh_key (ctrl_t ctrl, const char *userid); -- cgit v1.2.3