Bug 303779 - GPG Agent: "expire cached PINs after N seconds" doesn't efficient
Summary: GPG Agent: "expire cached PINs after N seconds" doesn't efficient
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.8.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-19 09:06 UTC by Pal Körössy
Modified: 2012-07-24 09:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pal Körössy 2012-07-19 09:06:54 UTC
I want the outgoing messages to be signed automatically, so 'Sign messages automatically' option is enabled in KMail's Settings/Configure_Kmail/Security/Composing section.
In Settings/Configure_Kmail/Security/GnuPG_settings/GPG_Agent/Expire_Cached_Pins_after_N_second option is set to 260000 (over 3 days) and it is not honoured, after a few hours (in less then one day) I'm prompted again to type the GPG PIN, even if the machine is not rebooted or restrarted.


Reproducible: Always

Steps to Reproduce:
1. Set 'Expire_Cached_Pins_after_N_second' option large enough in KMails settings
2. Activate 'Sign messages automatically' option in KMails settings
3. 
Actual Results:  
GPG PIN is re-requested to type before the 'Expire_Cached_Pins_after_N_second' time elapses.

Expected Results:  
No PIN re-request before the 'Expire_Cached_Pins_after_N_second' time elapses.
Comment 1 Allen Winter 2012-07-19 15:48:54 UTC
Look in ~/.gnupg/gpg-agent.conf

do you see a line with default-cache-ttl 260000
Comment 2 Allen Winter 2012-07-20 00:26:53 UTC
I read that if you want to set a timeout larger than 2 hrs (7200) then you must also set max-cache-ttl

so to test that, could you please edit .gnupg/gpg-agent.conf by hand and make sure you have the 2 lines:
default-cache-ttl 260000
max-cache-ttl 260000

hopefully the default-cache-ttl line is already there.

you may have to restart gpg after you edit that file, I don't recall.
at worst, just logout and back in again.
Comment 3 Laurent Montel 2012-07-21 07:37:19 UTC
Wait for infos
Comment 4 Pal Körössy 2012-07-24 09:40:16 UTC
There was no 'default-cache-ttl' line in .gnupg/gpg-agent.conf by default.
After adding the parameter, it seems to work, thanks.