Safeheron-SGX-Native-Development-Framework v1.2.0
Loading...
Searching...
No Matches
ssgx_utils_t_enclave_info.h
Go to the documentation of this file.
1#ifndef SSGXLIB_SSGX_UTILS_ENCLAVEINFO_H_
2#define SSGXLIB_SSGX_UTILS_ENCLAVEINFO_H_
3
4#include <mutex>
5
6#include "sgx_eid.h"
7
8namespace ssgx {
9namespace utils_t {
10
15 public:
21
26 void SetEnclaveEid(sgx_enclave_id_t eid);
27
32 sgx_enclave_id_t GetEnclaveEid();
33
34 private:
37
38 EnclaveInfo(const EnclaveInfo&) = delete;
39 EnclaveInfo& operator=(const EnclaveInfo&) = delete;
40
41 sgx_enclave_id_t enclave_eid_ = 0;
42 std::mutex mutex_;
43};
44
45} // namespace utils_t
46} // namespace ssgx
47
48#endif // SSGXLIB_SSGX_UTILS_ENCLAVEINFO_H_
Used to store some information related to the running enclave. (the eid corresponding to the running ...
Definition ssgx_utils_t_enclave_info.h:14
sgx_enclave_id_t GetEnclaveEid()
Get eid.
void SetEnclaveEid(sgx_enclave_id_t eid)
Set eid.
static EnclaveInfo & GetCurrentEnclave()
Singleton Pattern.
Definition ssgx_attestation_t.h:6