19 #ifndef ASYLO_IDENTITY_ATTESTATION_SGX_SGX_LOCAL_ASSERTION_VERIFIER_H_ 20 #define ASYLO_IDENTITY_ATTESTATION_SGX_SGX_LOCAL_ASSERTION_VERIFIER_H_ 22 #include "absl/synchronization/mutex.h" 23 #include "asylo/identity/additional_authenticated_data_generator.h" 24 #include "asylo/identity/attestation/enclave_assertion_verifier.h" 34 class SgxLocalAssertionVerifier
final :
public EnclaveAssertionVerifier {
66 static constexpr EnclaveIdentityType identity_type_ = CODE_IDENTITY;
69 static const char *
const authority_type_;
72 std::string attestation_domain_;
75 std::unique_ptr<AdditionalAuthenticatedDataGenerator> aad_generator_;
78 bool initialized_ ABSL_GUARDED_BY(initialized_mu_);
81 mutable absl::Mutex initialized_mu_;
std::string AuthorityType() const override
Gets the type of this assertion authority.
SgxLocalAssertionVerifier()
Constructs an uninitialized SgxLocalAssertionVerifier.
Status Verify(const std::string &user_data, const Assertion &assertion, EnclaveIdentity *peer_identity) const override
Verifies an assertion that is compatible with this verifier's identity type and authority type...
Status Initialize(const std::string &config) override
Initializes this assertion authority using the provided config.
ABSL_CONST_INIT const char kStatusMoveAssignmentMsg[]
bool IsInitialized() const override
Indicates whether this assertion authority has been initialized successfully via a call to Initialize...
Status CreateAssertionRequest(AssertionRequest *request) const override
Creates an assertion request compatible with this verifier's identity type and authority type and pla...
EnclaveIdentityType IdentityType() const override
Gets the enclave identity type handled by this assertion authority.
StatusOr< bool > CanVerify(const AssertionOffer &offer) const override
Indicates whether the assertion offered in offer can be verified by this verifier.