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

Method issue_cert

guest-agent/src/rpc_service.rs:71–88  ·  view source on GitHub ↗
(&self, key: &KeyPair, config: CertConfigV2)

Source from the content-addressed store, hash-verified

69 }
70
71 async fn issue_cert(&self, key: &KeyPair, config: CertConfigV2) -> Result<Vec<String>> {
72 let pubkey = key.public_key_der();
73 let attestation = self
74 .platform
75 .certificate_attestation(&pubkey)
76 .context("Failed to get certificate attestation")?;
77 let csr = CertSigningRequestV2 {
78 confirm: "please sign cert:".to_string(),
79 pubkey,
80 config,
81 attestation,
82 };
83 let signature = csr.signed_by(key).context("Failed to sign the CSR")?;
84 self.cert_client
85 .sign_csr(&csr, &signature)
86 .await
87 .context("Failed to sign the CSR")
88 }
89
90 async fn request_demo_cert(&self) -> Result<String> {
91 let key = KeyPair::generate().context("Failed to generate demo key")?;

Callers 3

request_demo_certMethod · 0.80
get_tls_keyMethod · 0.80
derive_keyMethod · 0.80

Calls 3

signed_byMethod · 0.45
sign_csrMethod · 0.45

Tested by

no test coverage detected