From c90b8b54ebe0d7a1a2a4f5acf295708f11ff314d Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 11 Dec 2018 12:08:27 +0100 Subject: Add application name and PIN type to the pinentry cache ID This patch adds the application name (nitrocli) and the type of the requested PIN (user PIN) to the cache ID user with pinentry to conform with the GnuPG documentation [0]: > By convention either the hexified fingerprint of the key shall be used > for cache_id or an arbitrary string prefixed with the name of the > calling application and a colon: Like gpg:somestring. [0] https://www.gnupg.org/documentation/manuals/gnupg/Agent-GET_005fPASSPHRASE.html#Agent-GET_005fPASSPHRASE --- nitrocli/src/pinentry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nitrocli/src/pinentry.rs b/nitrocli/src/pinentry.rs index d96d279..0780540 100644 --- a/nitrocli/src/pinentry.rs +++ b/nitrocli/src/pinentry.rs @@ -21,7 +21,7 @@ use error::Error; use std::process; -const CACHE_ID: &str = "nitrokey"; +const CACHE_ID: &str = "nitrocli:user"; fn parse_pinentry_passphrase(response: Vec) -> Result, Error> { -- cgit v1.2.3