jamessan / vim-gnupg

This script implements transparent editing of gpg encrypted files.
http://www.vim.org/scripts/script.php?script_id=3645
728 stars 73 forks source link

Does not prompt for password frequently enough #85

Closed stormyweathers closed 6 years ago

stormyweathers commented 6 years ago

Just started using gnupg so I apologize if this is trivial. I create a test file, and successfully set a recipient. I attempt to open the file, and it prompts me for a passkey. I enter the passkey and the file is decrypted. I close using :q and then open again with vim test.pgp and the decrypted contents display immediately without a passkey prompt. How do I set it to require password each time its opened?

Nudin commented 6 years ago

You are probably using GPG-Agent. You can disable GPG-Agent or set the cache-ttl to a smaller number (even 0). See here for linux: https://wiki.ubuntuusers.de/GPG-Agent/

jamessan commented 6 years ago

You are probably using GPG-Agent.

You beat me to it. :) That's exactly the cause. The plugin itself never handles any passwords. It let's gpg take care of that, so the only caching would be happening in gpg-agent.