MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / new

Method new

gateway/src/kv/https_client.rs:58–70  ·  view source on GitHub ↗
(
        validator: Arc<dyn CertValidator>,
        ca_cert_der: CertificateDer<'static>,
    )

Source from the content-addressed store, hash-verified

56
57impl CustomCertVerifier {
58 fn new(
59 validator: Arc<dyn CertValidator>,
60 ca_cert_der: CertificateDer<'static>,
61 ) -> Result<Self> {
62 let mut root_store = rustls::RootCertStore::empty();
63 root_store
64 .add(ca_cert_der)
65 .context("failed to add CA cert to root store")?;
66 Ok(Self {
67 validator,
68 root_store: Arc::new(root_store),
69 })
70 }
71}
72
73impl ServerCertVerifier for CustomCertVerifier {

Callers

nothing calls this directly

Calls 5

addMethod · 0.80
nextMethod · 0.80
into_iterMethod · 0.80
cloneMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected