From 684a520ebcc3e6faf4f9a2f55b7a48fb276ee574 Mon Sep 17 00:00:00 2001 From: Raul Gherman Date: Sat, 7 Sep 2024 17:59:39 +0300 Subject: [PATCH] [2] --- kaminari/src/opt.rs | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/kaminari/src/opt.rs b/kaminari/src/opt.rs index f27bc61..edec1f3 100644 --- a/kaminari/src/opt.rs +++ b/kaminari/src/opt.rs @@ -86,31 +86,6 @@ pub fn get_tls_client_conf(s: &str) -> Option { } } -#[cfg(feature = "tls")] -pub fn get_tls_server_conf(s: &str) -> Option { - let it = s.split(';').map(|x| x.trim()); - - if !has_opt!(it.clone(), "tls") { - return None; - } - - let crt = get_opt!(it.clone(), "cert"); - let key = get_opt!(it.clone(), "key"); - let ocsp = get_opt!(it.clone(), "ocsp"); - let server_name = get_opt!(it.clone(), "servername"); - - if crt.is_some() && key.is_some() || server_name.is_some() { - Some(TlsServerConf { - crt: crt.map_or(String::new(), String::from), - key: key.map_or(String::new(), String::from), - ocsp: ocsp.map_or(String::new(), String::from), - server_name: server_name.map_or(String::new(), String::from), - }) - } else { - panic!("tls: require cert and key or servername") - } -} - #[cfg(test)] #[cfg(any(feature = "ws", feature = "tls"))] mod test {