From 6873926deabc5b83be4c1d051a54d21b33f0f331 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 26 Jan 2023 10:47:42 +0100 Subject: [PATCH] rest-server: generic certificate path types to not require a PathBuf on the caller side Signed-off-by: Wolfgang Bumiller --- proxmox-rest-server/src/connection.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proxmox-rest-server/src/connection.rs b/proxmox-rest-server/src/connection.rs index 768b9361..a154182f 100644 --- a/proxmox-rest-server/src/connection.rs +++ b/proxmox-rest-server/src/connection.rs @@ -48,8 +48,12 @@ impl TlsAcceptorBuilder { self } - pub fn certificate_paths_pem(mut self, key: PathBuf, cert: PathBuf) -> Self { - self.tls = Some(Tls::FilesPem(key, cert)); + pub fn certificate_paths_pem( + mut self, + key: impl Into, + cert: impl Into, + ) -> Self { + self.tls = Some(Tls::FilesPem(key.into(), cert.into())); self }