Use new from file when loading the pem
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -126,7 +126,7 @@ impl RtspServer {
|
||||
debug!("Setting up TLS using {}", cert_file);
|
||||
let auth = self.server.get_auth().unwrap_or_else(RTSPAuth::new());
|
||||
|
||||
let cert = TlsCertificate::new_from_pem(&fs::read_to_string(cert_file).expect("TLS file not found")).expect("Not a valid TLS certificate");
|
||||
let cert = TlsCertificate::new_from_file(cert_file).expect("Not a valid TLS certificate or not found.");
|
||||
auth.set_tls_certificate(Some(&cert));
|
||||
auth.set_tls_authentication_mode(client_auth);
|
||||
auth.set_supported_methods(RTSPAuthMethod::None);
|
||||
|
||||
Reference in new issue
Block a user