diff options
author | Werner Koch <wk@gnupg.org> | 2019-01-26 23:10:38 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-01-26 23:10:38 +0100 |
commit | ec13b1c562e34c0fcbc7b848ab6dc187b79cf2c1 (patch) | |
tree | 33ad3af6094e2a64625772e0f60104e48e8b917e /g10/main.h | |
parent | scd: Improve app selection for app "undefined". (diff) | |
download | gnupg2-ec13b1c562e34c0fcbc7b848ab6dc187b79cf2c1.tar.xz gnupg2-ec13b1c562e34c0fcbc7b848ab6dc187b79cf2c1.zip |
gpg: Move S2K encoding function to a shared file.
* g10/passphrase.c (encode_s2k_iterations): Move function to ...
* common/openpgp-s2k.c: new file. Remove default intialization code.
* common/openpgpdefs.h (S2K_DECODE_COUNT): New to keep only one copy.
* g10/call-agent.c (agent_get_s2k_count): Change to return the count
and print an error.
* agent/protect.c: Include openpgpdefs.h
* g10/card-util.c (gen_kdf_data): Adjust for changes
* g10/gpgcompose.c: Include call-agent.h.
(sk_esk): Adjust for changes.
* g10/passphrase (passphrase_to_dek): Adjust for changes.
* g10/main.h (S2K_DECODE_COUNT): Remove macro.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/main.h')
-rw-r--r-- | g10/main.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/g10/main.h b/g10/main.h index 86f8589b2..867f6975b 100644 --- a/g10/main.h +++ b/g10/main.h @@ -507,8 +507,6 @@ gpg_error_t card_generate_subkey (ctrl_t ctrl, kbnode_t pub_keyblock); int card_store_subkey (KBNODE node, int use); #endif -#define S2K_DECODE_COUNT(_val) ((16ul + ((_val) & 15)) << (((_val) >> 4) + 6)) - /*-- migrate.c --*/ void migrate_secring (ctrl_t ctrl); |