diff options
author | Werner Koch <wk@gnupg.org> | 2018-04-11 20:35:40 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-04-11 20:35:40 +0200 |
commit | 789d240cb40ab36406a7c57ad49897e0bafbb41e (patch) | |
tree | fe2c3322c4019a7078341fbbe121f1c048d32254 /g10/passphrase.c | |
parent | agent: Improve the unknown ssh flag detection. (diff) | |
download | gnupg2-789d240cb40ab36406a7c57ad49897e0bafbb41e.tar.xz gnupg2-789d240cb40ab36406a7c57ad49897e0bafbb41e.zip |
gpg: New option --no-symkey-cache.
* g10/gpg.c (oNoSymkeyCache): New.
(opts): Add that option.
(main): Set var.
* g10/options.h (struct opt): New field no_symkey_cache.
* g10/passphrase.c (passphrase_to_dek): Implement that feature.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/passphrase.c')
-rw-r--r-- | g10/passphrase.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c index a498f627b..ffdcdf2bd 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -317,6 +317,9 @@ passphrase_to_dek (int cipher_algo, STRING2KEY *s2k, canceled = &dummy_canceled; *canceled = 0; + if (opt.no_symkey_cache) + nocache = 1; /* Force no symmtric key caching. */ + if ( !s2k ) { log_assert (create && !nocache); |