aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-03-02 22:13:21 -0500
committerJesse Luehrs <doy@tozt.net>2021-03-02 22:13:21 -0500
commit604e09e6ae098350bffe18bde26e1c62f7e88a00 (patch)
treeed40c95a683fa200b11dc3f19accca7eee48ccd5 /src/config.rs
parentd149a01bffd2bfdd16e471c8be55f7760c70dd69 (diff)
downloadrbw-604e09e6ae098350bffe18bde26e1c62f7e88a00.tar.gz
rbw-604e09e6ae098350bffe18bde26e1c62f7e88a00.zip
make the pinentry program configurable
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 418da45..9bb4696 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -10,6 +10,8 @@ pub struct Config {
pub identity_url: Option<String>,
#[serde(default = "default_lock_timeout")]
pub lock_timeout: u64,
+ #[serde(default = "default_pinentry")]
+ pub pinentry: String,
}
impl Default for Config {
@@ -19,6 +21,7 @@ impl Default for Config {
base_url: Default::default(),
identity_url: Default::default(),
lock_timeout: default_lock_timeout(),
+ pinentry: default_pinentry(),
}
}
}
@@ -27,6 +30,10 @@ pub fn default_lock_timeout() -> u64 {
3600
}
+pub fn default_pinentry() -> String {
+ "pinentry".to_string()
+}
+
impl Config {
pub fn new() -> Self {
Self::default()