Skip to content

Commit

Permalink
Clarify documentation on Verifier::measurements()
Browse files Browse the repository at this point in the history
Clarify that measurements and status verifiers are a one of construct.
Where one of the provided values needs to succeed to verify an
attestation report.
  • Loading branch information
nick-mobilecoin committed Jun 26, 2023
1 parent a272d63 commit 732810a
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions attest/verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,32 @@ impl Verifier {
self
}

/// Verify the given MrEnclave-based status verifier succeeds
/// Add a MrEnclave-based status verifier to the potential status verifiers
///
/// For MRENCLAVE and MRSIGNER verifiers, only one of them needs to succeed.
/// This allows for one to support multiple versions of an enclave for
/// things like enclave update periods.
pub fn mr_enclave(&mut self, verifier: MrEnclaveVerifier) -> &mut Self {
self.status_verifiers.push(verifier.into());
self
}

/// Verify the given MrSigner-based status verifier succeeds
/// Add a MrSigner-based status verifier to the potential status verifiers
///
/// For MRENCLAVE and MRSIGNER verifiers, only one of them needs to succeed.
/// This allows for one to support multiple versions of an enclave for
/// things like enclave update periods.
pub fn mr_signer(&mut self, verifier: MrSignerVerifier) -> &mut Self {
self.status_verifiers.push(verifier.into());
self
}

/// Verify at least one of the provided measurements matches the enclave
/// Add a measurement as a potential status verifier
///
/// For MRENCLAVE and MRSIGNER measurements, only one of them needs to
/// match.
/// This allows for one to support multiple versions of an enclave for
/// things like enclave update periods.
pub fn measurements<'a>(
&mut self,
measurements: impl IntoIterator<Item = &'a TrustedMeasurement>,
Expand Down

0 comments on commit 732810a

Please sign in to comment.