Skip to content

Commit

Permalink
get-derived-key: fix URL + add to KBS confidential-containers#6
Browse files Browse the repository at this point in the history
  • Loading branch information
eldios committed Feb 5, 2025
1 parent 1cd2716 commit 2c84699
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion attestation-agent/attestation-agent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl AttestationAPIs for AttestationAgent {
Ok(evidence.into_bytes())
}

async fn get_derived_key(&self, key_id: &[u8]) -> Result<Vec<u8>> {
async fn get_derived_key(&self, key_id: &[u8], context: Vec<u8>) -> Result<Vec<u8>> {
let context = Vec::new(); // Empty context vector as per SNP implementation
self.attester.get_derived_key(key_id, context).await
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl EvidenceProvider for MockedEvidenceProvider {
Ok("test evidence".into())
}

async fn get_derived_key(&self, _key_id: &[u8], context: Vec<u8>) -> Result<Vec<u8>> {
async fn get_derived_key(&self, _key_id: &[u8], _context: Vec<u8>) -> Result<Vec<u8>> {
Ok(vec![0u8; 32]) // Return a mock 32-byte key filled with zeros
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ impl EvidenceProvider for NativeEvidenceProvider {
Ok(detect_tee_type())
}

async fn get_derived_key(&self, key_id: &[u8]) -> Result<Vec<u8>> {
async fn get_derived_key(&self, key_id: &[u8], context: Vec<u8>) -> Result<Vec<u8>> {
self.0
.get_derived_key(key_id)
.get_derived_key(key_id, context)
.await
.map_err(|e| Error::GetDerivedKey(e.to_string()))
}
Expand Down

0 comments on commit 2c84699

Please sign in to comment.