videocall_cli/
fake_cert_verifier.rs

1/*
2 * Copyright 2025 Security Union LLC
3 *
4 * Licensed under either of
5 *
6 * * Apache License, Version 2.0
7 *   (http://www.apache.org/licenses/LICENSE-2.0)
8 * * MIT license
9 *   (http://opensource.org/licenses/MIT)
10 *
11 * at your option.
12 *
13 * Unless you explicitly state otherwise, any contribution intentionally
14 * submitted for inclusion in the work by you, as defined in the Apache-2.0
15 * license, shall be dual licensed as above, without any additional terms or
16 * conditions.
17 */
18
19use rustls::{client::ServerCertVerifier, ServerName};
20
21pub struct NoVerification;
22
23impl ServerCertVerifier for NoVerification {
24    fn verify_server_cert(
25        &self,
26        _end_entity: &rustls::Certificate,
27        _intermediates: &[rustls::Certificate],
28        _server_name: &ServerName,
29        _scts: &mut dyn Iterator<Item = &[u8]>,
30        _ocsp_response: &[u8],
31        _now: std::time::SystemTime,
32    ) -> Result<rustls::client::ServerCertVerified, rustls::Error> {
33        Ok(rustls::client::ServerCertVerified::assertion())
34    }
35}