gpg-connect-agent querying max-cache-ttl

Rob Fries Rob.Fries at ascensus.com
Mon Jan 12 21:48:59 CET 2015


Peter,

Thanks for the reply, but this is what Patrick and I discussed of ticket.

> You're mistaken; it's as Patrick said through gpgconf, the program to programmatically query the configuration.

But I am not looking for the value in the "configuration", I am looking for the "time remaining" until a passphrase expires.

If I set my max-cache-ttl to 5 days:

$ echo $((60*60*24*5))
432000

I can retrieve that value here:

$ gpgconf --list-options gpg-agent|grep ^max-cache-ttl: |cut -d: -f 8,10
7200:432000

Then I set my passphrase:

$ gpg-preset-passphrase -cP <PASSPHRASE> $key

I am looking for the "time remaining" until I am required to re-enter that passphrase. Gpgconf will only give me what is configured as the max:

$ gpgconf --list-options gpg-agent|grep ^max-cache-ttl: |cut -d: -f 8,10
7200:432000
$ gpgconf --list-options gpg-agent|grep ^max-cache-ttl: |cut -d: -f 8,10
7200:432000
$ gpgconf --list-options gpg-agent|grep ^max-cache-ttl: |cut -d: -f 8,10
7200:432000

In 5 days, I am looking for that value to be 1 day or 86400 seconds so that I can trigger an alert.

I hope that clarifies everything.

Thanks!
-Rob

CONFIDENTIALITY NOTICE: This message, including attachments, is intended to be viewed only by the addressee. It may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. No confidentiality or privilege is lost by any transmission error. This message may contain nonpublic personal information about consumers subject to the restrictions of the Gramm-Leach-Bliley Act and the Sarbanes-Oxley Act. You may not directly or indirectly reuse or disclose such information for any purpose except as permitted by law. Any dissemination, distribution or copying of this message is strictly prohibited without our prior written permission. If you are not an intended recipient, or if you have received this message in error, please notify us immediately by return e-mail and permanently remove the original message and any copies from your computer and all back-up systems.


More information about the Gnupg-users mailing list