19 #ifndef ASYLO_IDENTITY_PLATFORM_SGX_SGX_IDENTITY_UTIL_H_ 20 #define ASYLO_IDENTITY_PLATFORM_SGX_SGX_IDENTITY_UTIL_H_ 24 #include "asylo/identity/identity.pb.h" 25 #include "asylo/identity/platform/sgx/sgx_identity.pb.h" 26 #include "asylo/util/statusor.h" StatusOr< EnclaveIdentityExpectation > SerializeSgxIdentityExpectation(const SgxIdentityExpectation &sgx_expectation)
Serializes sgx_expectation, returning an EnclaveIdentityExpectation on success or a non-OK Status on ...
StatusOr< SgxIdentityExpectation > CreateSgxIdentityExpectation(SgxIdentity identity, SgxIdentityMatchSpec match_spec)
Returns an SgxIdentityExpectation formed from identity and match_spec, or returns a non-OK Status if ...
StatusOr< SgxIdentityMatchSpec > ParseSgxIdentityMatchSpec(const std::string &generic_match_spec)
Parses and validates generic_match_spec, returning an SgxIdentityMatchSpec on success or a non-OK Sta...
StatusOr< SgxIdentityExpectation > ParseSgxIdentityExpectation(const EnclaveIdentityExpectation &generic_expectation)
Parses and validates generic_expectation, returning an SgxIdentityExpectation on success or a non-OK ...
SgxIdentity GetSelfSgxIdentity()
Returns the current enclave's identity.
SgxIdentityMatchSpecOptions
This enum defines a set of recommended match specs.
Definition: sgx_identity_util.h:48
bool IsValidSgxIdentityExpectation(const SgxIdentityExpectation &expectation)
Returns whether expectation is valid.
ABSL_CONST_INIT const char kStatusMoveAssignmentMsg[]
StatusOr< std::string > SerializeSgxIdentityMatchSpec(const SgxIdentityMatchSpec &sgx_match_spec)
Serializes sgx_match_spec, returning a string on success or a non-OK Status on failure.
bool IsValidSgxIdentityMatchSpec(const SgxIdentityMatchSpec &match_spec)
Returns whether match_spec is valid.
StatusOr< EnclaveIdentity > SerializeSgxIdentity(const SgxIdentity &sgx_identity)
Serializes sgx_identity, returning an EnclaveIdentity on success or a non-OK Status on failure...
StatusOr< SgxIdentity > ParseSgxIdentity(const EnclaveIdentity &generic_identity)
Parses and validates generic_identity, returning an SgxIdentity on success or a non-OK Status on fail...
bool IsValidSgxIdentity(const SgxIdentity &identity)
Returns whether identity is valid.
StatusOr< SgxIdentityMatchSpec > CreateSgxIdentityMatchSpec(SgxIdentityMatchSpecOptions options)
Returns an SgxIdentityMatchSpec corresponding to options on success or a non-OK Status on failure...
StatusOr< SgxIdentityExpectation > CreateSgxIdentityExpectation(SgxIdentity identity, SgxIdentityMatchSpecOptions options)
Returns an SgxIdentityExpectation formed from identity and the match spec corresponding to options...