From 96108bef3fecff98509f6200025d7993c820cd58 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 11 Dec 2018 12:09:09 +0100 Subject: Rename pinentry constants to match the documented names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GnuPG documentation [0] refers to the GET_PASSPHRASE arguments as “error message”, “prompt” and “description”. This patch changes the names of the constants for these arguments to match the documented names. [0] https://www.gnupg.org/documentation/manuals/gnupg/Agent-GET_005fPASSPHRASE.html#Agent-GET_005fPASSPHRASE --- nitrocli/src/pinentry.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nitrocli/src/pinentry.rs b/nitrocli/src/pinentry.rs index 0780540..028550f 100644 --- a/nitrocli/src/pinentry.rs +++ b/nitrocli/src/pinentry.rs @@ -50,11 +50,11 @@ fn parse_pinentry_passphrase(response: Vec) -> Result, Error> { pub fn inquire_passphrase() -> Result, Error> { - const PINENTRY_DESCR: &str = "+"; - const PINENTRY_TITLE: &str = "Please+enter+user+PIN"; - const PINENTRY_PASSWD: &str = "PIN"; + const PINENTRY_ERROR_MSG: &str = "+"; + const PINENTRY_PROMPT: &str = "PIN"; + const PINENTRY_DESCR: &str = "Please+enter+user+PIN"; - let args = vec![CACHE_ID, PINENTRY_DESCR, PINENTRY_PASSWD, PINENTRY_TITLE].join(" "); + let args = vec![CACHE_ID, PINENTRY_ERROR_MSG, PINENTRY_PROMPT, PINENTRY_DESCR].join(" "); let command = "GET_PASSPHRASE --data ".to_string() + &args; // We could also use the --data parameter here to have a more direct // representation of the passphrase but the resulting response was -- cgit v1.2.3