Safeheron-SGX-Native-Development-Framework v1.2.0
Loading...
Searching...
No Matches
ssgx_attestation_t.h
Go to the documentation of this file.
1#ifndef SAFEHERON_SGX_TRUSTED_ATTESTATION_T_H_
2#define SAFEHERON_SGX_TRUSTED_ATTESTATION_T_H_
3
4#include <string>
5
6namespace ssgx {
12namespace attestation_t {
13
35
43 public:
45 error_code_ = ErrorCode::Unknown;
46 }
47
48 public:
55 bool CreateReport(const uint8_t user_data[64], std::string& report);
56
64 bool VerifyReport(const uint8_t user_data[64], const std::string& report, std::string& enclave_id);
65
73 bool CreateReport(const std::string& user_info, std::string& report);
74
82 bool VerifyReport(const std::string& user_info, const std::string& report, std::string& enclave_id);
83
93 bool CreateReport(const std::string& user_info, uint64_t timestamp, std::string& report);
94
105 bool VerifyReport(const std::string& user_info, uint64_t timestamp, uint64_t validity_seconds,
106 const std::string& report, std::string& enclave_id);
107
113 return error_code_;
114 };
115
120 std::string GetLastErrorMsg() const {
121 return error_msg_;
122 }
123
124 private:
125 ErrorCode error_code_;
126 std::string error_msg_;
127};
128
129} // namespace attestation_t
130} // namespace ssgx
131
132#endif // SAFEHERON_SGX_TRUSTED_ATTESTATION_T_H_
The class for Intel DCAP remote attestation.
Definition ssgx_attestation_t.h:42
bool VerifyReport(const std::string &user_info, const std::string &report, std::string &enclave_id)
Verify a remote attestation report within a Trusted Execution Environment.
bool CreateReport(const std::string &user_info, std::string &report)
Generate a remote attestation report.
bool VerifyReport(const uint8_t user_data[64], const std::string &report, std::string &enclave_id)
Verify a remote attestation report within a Trusted Execution Environment.
bool VerifyReport(const std::string &user_info, uint64_t timestamp, uint64_t validity_seconds, const std::string &report, std::string &enclave_id)
Verify a remote attestation report within a Trusted Execution Environment.
ErrorCode GetLastErrorCode() const
Get the last error code.
Definition ssgx_attestation_t.h:112
bool CreateReport(const std::string &user_info, uint64_t timestamp, std::string &report)
Generate a remote attestation report.
RemoteAttestor()
Definition ssgx_attestation_t.h:44
std::string GetLastErrorMsg() const
Get the last error message.
Definition ssgx_attestation_t.h:120
bool CreateReport(const uint8_t user_data[64], std::string &report)
Generate a remote attestation report.
ErrorCode
Error codes definition.
Definition ssgx_attestation_t.h:21
Definition ssgx_attestation_t.h:6