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

Method load

ra-tls/src/cert.rs:69–73  ·  view source on GitHub ↗

Load a CA certificate and private key from files.

(cert_path: impl AsRef<Path>, key_path: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

67
68 /// Load a CA certificate and private key from files.
69 pub fn load(cert_path: impl AsRef<Path>, key_path: impl AsRef<Path>) -> Result<Self> {
70 let pem_key = fs::read_to_string(key_path).context("Failed to read key file")?;
71 let pem_cert = fs::read_to_string(cert_path).context("Failed to read cert file")?;
72 Self::new(pem_cert, pem_key)
73 }
74
75 /// Sign a certificate request.
76 pub fn sign(&self, req: CertRequest<impl PublicKeyData>) -> Result<Certificate> {

Callers 7

render_prometheusMethod · 0.45
freezedMethod · 0.45
num_connectionsMethod · 0.45
getMethod · 0.45
resolveMethod · 0.45
statusMethod · 0.45
check_connection_limitFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected