rest-server: generic certificate path types

to not require a PathBuf on the caller side

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2023-01-26 10:47:42 +01:00
parent 2f2f5cfcd8
commit 6873926dea

View File

@ -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<PathBuf>,
cert: impl Into<PathBuf>,
) -> Self {
self.tls = Some(Tls::FilesPem(key.into(), cert.into()));
self
}