diff options
author | Jesse Luehrs <doy@tozt.net> | 2023-02-18 20:40:08 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2023-02-18 20:40:08 -0500 |
commit | 9d9d5dac7a2e342a35482756ef7c92d045f8f835 (patch) | |
tree | 21fa0b05cd89a8a47fad6e766d609649805f45e3 /src/config.rs | |
parent | 323a4a954afc3ec7f7bcda0fd914219c7c2d146d (diff) | |
download | rbw-9d9d5dac7a2e342a35482756ef7c92d045f8f835.tar.gz rbw-9d9d5dac7a2e342a35482756ef7c92d045f8f835.zip |
refactor client cert handling
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs index 8209ddb..91aa449 100644 --- a/src/config.rs +++ b/src/config.rs @@ -12,7 +12,7 @@ pub struct Config { pub lock_timeout: u64, #[serde(default = "default_pinentry")] pub pinentry: String, - pub client_cert_path: Option<String>, + pub client_cert_path: Option<std::path::PathBuf>, // backcompat, no longer generated in new configs #[serde(skip_serializing)] pub device_id: Option<String>, @@ -151,8 +151,8 @@ impl Config { } #[must_use] - pub fn client_cert_path(&self) -> String { - self.client_cert_path.clone().unwrap_or_default() + pub fn client_cert_path(&self) -> Option<&std::path::Path> { + self.client_cert_path.as_deref() } #[must_use] |