[PATCH] Create cache item for current key from previous.

Justus Winter justus at g10code.com
Mon Jul 25 10:22:05 CEST 2016


Hi :)

-------------- next part --------------
Ben Kibbey <bjk at luxsci.net> writes:

> * agent/findkey.c (unprotect): Create cache item from previous and
> current values.
> --
>
> Fixes the KEYINFO cache field for a key that previously failed do to not
> being found in the cache but succeeded when the last_stored_cache_key
> was tried. Use the last_stored_cache_key cached passphrase for the new
> cache entry for the current keygrip.

Thanks, can you please tell me how to reproduce this problem?

Justus

>
> Has the limitation that the key will need to be used at least once
> before the cache field of KEYINFO is updated.
>
> Signed-off-by: Ben Kibbey <bjk at luxsci.net>
> ---
>  agent/findkey.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/agent/findkey.c b/agent/findkey.c
> index c5ab0e9..838e17f 100644
> --- a/agent/findkey.c
> +++ b/agent/findkey.c
> @@ -528,6 +528,7 @@ unprotect (ctrl_t ctrl, const char *cache_nonce, const char *desc_text,
>                                      &result, &resultlen);
>                if (!rc)
>                  {
> +                  agent_put_cache (hexgrip, cache_mode, pw, 0);
>                    if (r_passphrase)
>                      *r_passphrase = pw;
>                    else
> -- 
> 2.8.1
>
>
> _______________________________________________
> Gnupg-devel mailing list
> Gnupg-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: </pipermail/attachments/20160725/dab62a21/attachment.sig>


More information about the Gnupg-devel mailing list