From 789d240cb40ab36406a7c57ad49897e0bafbb41e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 11 Apr 2018 20:35:40 +0200 Subject: 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 --- g10/passphrase.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'g10/passphrase.c') 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); -- cgit v1.2.3