3

I'm trying to get started with encryption on emacs and I'm experiencing the same issue as mentioned in this question:Emacs opens gpg file without asking for passphrase. When I save a .gpg file, emacs prompts for the password to use, but then I can open the file (even after closing and reopening emacs) without re-entering the password. Unlike the user in the question above, there are no stored passwords in the password manager.

edit: forgot to mention that epa-file-cache-passphrase-for-symmetric-encryption is nil

mowwwalker
  • 211
  • 2
  • 6
  • did you check gpg-agent and epa-file-cache-passphrase-for-symmetric-encryption caching, as mentioned in the question you referred? – junnu Oct 22 '18 at 12:06

1 Answers1

1

For gpg version < 2, caching can be from emacs or the gpg-agent

To disable caching from emacs, set epa-file-cache-passphrase-for-symmetric-encryption to nil if it is not nil in emacs config file

(setq epa-file-cache-passphrase-for-symmetric-encryption nil)

To disable caching by gpg-agent, add default-cache-ttl 0 to gpg config file located at ~/.gnupg/gpg-agent.conf

For gpg version >= 2, disabling gpg-agent cache would suffice. So just add default-cache-ttl 0 to gpg config file located at ~/.gnupg/gpg-agent.conf

junnu
  • 770
  • 3
  • 12