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

Method new_mtls

ra-rpc/src/client.rs:96–112  ·  view source on GitHub ↗
(
        remote_uri: String,
        cert_pem: String,
        key_pem: String,
        pccs_url: Option<String>,
    )

Source from the content-addressed store, hash-verified

94 }
95
96 pub fn new_mtls(
97 remote_uri: String,
98 cert_pem: String,
99 key_pem: String,
100 pccs_url: Option<String>,
101 ) -> Result<Self> {
102 RaClientConfig::builder()
103 .tls_no_check(true)
104 .tls_built_in_root_certs(false)
105 .remote_uri(remote_uri)
106 .tls_client_cert(cert_pem)
107 .tls_client_key(key_pem)
108 .maybe_pccs_url(pccs_url)
109 .build()
110 .into_client()
111 .context("failed to create client")
112 }
113
114 async fn try_validate_attestation(&self, response: &Response) -> Result<()> {
115 let Some(validator) = &self.cert_validator else {

Callers

nothing calls this directly

Calls 2

into_clientMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected