diff options
author | Jesse Luehrs <doy@tozt.net> | 2023-02-18 14:10:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-18 14:10:03 -0500 |
commit | c77ccb67cf464abfb30d42f2ef870dc2bbf24366 (patch) | |
tree | d277a6da02c501410dc4cc157e5db297055210a5 /src/config.rs | |
parent | c32e1daefc51441ba1349e9ed9e64fe2b17d7c23 (diff) | |
parent | da0b7528c083318ad25d8cd9c2741fd6212edd26 (diff) | |
download | rbw-c77ccb67cf464abfb30d42f2ef870dc2bbf24366.tar.gz rbw-c77ccb67cf464abfb30d42f2ef870dc2bbf24366.zip |
Merge pull request #92 from fopina/client_cert
support for client certificates
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 23ef765..baa855b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -12,6 +12,7 @@ pub struct Config { pub lock_timeout: u64, #[serde(default = "default_pinentry")] pub pinentry: String, + pub client_cert_path: Option<String>, // backcompat, no longer generated in new configs #[serde(skip_serializing)] pub device_id: Option<String>, @@ -25,6 +26,7 @@ impl Default for Config { identity_url: None, lock_timeout: default_lock_timeout(), pinentry: default_pinentry(), + client_cert_path: None, device_id: None, } } @@ -149,6 +151,12 @@ impl Config { } #[must_use] + pub fn client_cert_path(&self) -> String { + self.client_cert_path.clone() + .unwrap_or_else(|| "".to_string()) + } + + #[must_use] pub fn server_name(&self) -> String { self.base_url .clone() |