Skip to content

Commit

Permalink
Add ExtractedEvidence to the AttestationResults proto. (project-o…
Browse files Browse the repository at this point in the history
…ak#4925)

This exposes more of the extracted evidence via the `AttestationResults`
proto, rather than just the encryption and signing public keys. Since
the `ExtractedEvidence` message  contains those same public keys again,
the existing public key fields are marked deprecated, to be removed in
a follow-up commit.
  • Loading branch information
timonvo authored Mar 21, 2024
1 parent 4a29c69 commit 2120a04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions oak_attestation_verification/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ pub fn to_attestation_results(
verify_result: &anyhow::Result<ExtractedEvidence>,
) -> AttestationResults {
match verify_result {
#[allow(deprecated)]
Ok(extracted_evidence) => AttestationResults {
status: Status::Success.into(),
encryption_public_key: extracted_evidence.encryption_public_key.clone(),
signing_public_key: extracted_evidence.signing_public_key.clone(),
extracted_evidence: Some(extracted_evidence.clone()),
..Default::default()
},
Err(err) => AttestationResults {
Expand Down
14 changes: 12 additions & 2 deletions proto/attestation/verification.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,22 @@ message AttestationResults {

// Contains the verified public key for encryption whenever the status
// indicates success. The key is serialized as an X25519 octet string.
bytes encryption_public_key = 3;
//
// Deprecated: will be replaced by the
// `extracted_evidence.encryption_public_key` field. For now both are
// populated.
bytes encryption_public_key = 3 [deprecated = true];

// Contains the verified public key for signing whenever the status
// indicates success. The key is serialized using the SEC 1
// Elliptic-Curve-Point-to-Octet-String conversion.
bytes signing_public_key = 4;
//
// Deprecated: will be replaced by the `extracted_evidence.signing_public_key`
// field. For now both are populated.
bytes signing_public_key = 4 [deprecated = true];

// Contains the evidence values whenever the status indicates success.
ExtractedEvidence extracted_evidence = 5;
}

// Evidence values extracted from attestation evidence during verification.
Expand Down

0 comments on commit 2120a04

Please sign in to comment.