diff options
author | Werner Koch <[email protected]> | 2022-12-02 09:03:36 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2022-12-02 09:09:58 +0000 |
commit | 1a85ee9a431bd2243e0ad79ce5eefa78e274a491 (patch) | |
tree | 9b2e33d41d5c373110efd33e00aafba723ca2308 /g10/call-agent.h | |
parent | gpg: Remove a mostly duplicated function. (diff) | |
download | gnupg-1a85ee9a431bd2243e0ad79ce5eefa78e274a491.tar.gz gnupg-1a85ee9a431bd2243e0ad79ce5eefa78e274a491.zip |
gpg: New export option "mode1003".
* agent/command.c (cmd_export_key): Add option --mode1003.
(command_has_option): Ditto.
* g10/build-packet.c (do_key): Implement mode 1003.
* g10/parse-packet.c (parse_key): Ditto.
* g10/options.h (EXPORT_MODE1003): New.o
* g10/call-agent.c (agent_export_key): Add arg mode1003.
* g10/export.c (parse_export_options): Add "mode1003"
(secret_key_to_mode1003): New.
(receive_seckey_from_agent): Add arg mode1003.
(do_export_one_keyblock): Pass option down.
--
This option allows to export a secret key in GnuPG's native format.
Thus no re-encryption is required and further the public key parameters
are also authenticated if a protection passphrase has been used.
Note that --import is not yet able to handle this new mode. Although
old version of GnuPG will bail out with "invalid packet" if a mode1003
exported secret key is seen.
Diffstat (limited to 'g10/call-agent.h')
-rw-r--r-- | g10/call-agent.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/call-agent.h b/g10/call-agent.h index a4cbc3162..a3f234ade 100644 --- a/g10/call-agent.h +++ b/g10/call-agent.h @@ -231,7 +231,7 @@ gpg_error_t agent_import_key (ctrl_t ctrl, const char *desc, /* Receive a key from the agent. */ gpg_error_t agent_export_key (ctrl_t ctrl, const char *keygrip, const char *desc, int openpgp_protected, - char **cache_nonce_addr, + int mode1003, char **cache_nonce_addr, unsigned char **r_result, size_t *r_resultlen, u32 *keyid, u32 *mainkeyid, int pubkey_algo); |