aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-12-11 12:09:09 +0100
committerDaniel Müller <d-e-s-o@users.noreply.github.com>2018-12-11 17:34:18 -0800
commit96108bef3fecff98509f6200025d7993c820cd58 (patch)
tree10a62b5cf1d72d4defff5706a5bc96ff9fc3c3a4
parentc90b8b54ebe0d7a1a2a4f5acf295708f11ff314d (diff)
downloadnitrocli-96108bef3fecff98509f6200025d7993c820cd58.tar.gz
nitrocli-96108bef3fecff98509f6200025d7993c820cd58.tar.bz2
Rename pinentry constants to match the documented names
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
-rw-r--r--nitrocli/src/pinentry.rs8
1 files 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<u8>) -> Result<Vec<u8>, Error> {
pub fn inquire_passphrase() -> Result<Vec<u8>, 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