aboutsummaryrefslogtreecommitdiff
path: root/nitrocli
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-12-11 12:08:27 +0100
committerDaniel Müller <d-e-s-o@users.noreply.github.com>2018-12-11 17:34:18 -0800
commitc90b8b54ebe0d7a1a2a4f5acf295708f11ff314d (patch)
treefa0d98365131ab4f76855ae87b4b28b74abb3df3 /nitrocli
parentcae0be5b2d8e45433d24b03698a9839bea9b2dbc (diff)
downloadnitrocli-c90b8b54ebe0d7a1a2a4f5acf295708f11ff314d.tar.gz
nitrocli-c90b8b54ebe0d7a1a2a4f5acf295708f11ff314d.tar.bz2
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
Diffstat (limited to 'nitrocli')
-rw-r--r--nitrocli/src/pinentry.rs2
1 files changed, 1 insertions, 1 deletions
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<u8>) -> Result<Vec<u8>, Error> {