Systemsicherheit/Assignment 7 - SGX Hands-on/SGX101_sample_code-master/RemoteAttestation/Enclave/Enclave.h
Paul Zinselmeyer ba8e969470
All checks were successful
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (push) Successful in 1m2s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (push) Successful in 1m3s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (push) Successful in 1m0s
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (pull_request) Successful in 30s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (pull_request) Successful in 10s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (pull_request) Successful in 8s
[Assignment-7] add SGX sample code from VM
2024-06-29 17:55:44 +02:00

43 lines
805 B
C++

#ifndef ENCLAVE_H
#define ENCLAVE_H
#include <string>
#include <stdio.h>
#include <limits.h>
#include <unistd.h>
#include "LogBase.h"
#include "UtilityFunctions.h"
#include "isv_enclave_u.h"
// Needed to call untrusted key exchange library APIs, i.e. sgx_ra_proc_msg2.
#include "sgx_ukey_exchange.h"
// Needed to query extended epid group id.
#include "sgx_uae_service.h"
class Enclave {
public:
static Enclave* getInstance();
virtual ~Enclave();
sgx_status_t createEnclave();
sgx_enclave_id_t getID();
sgx_status_t getStatus();
sgx_ra_context_t getContext();
private:
Enclave();
static Enclave *instance;
const char *enclave_path = "isv_enclave.signed.so";
sgx_enclave_id_t enclave_id;
sgx_status_t status;
sgx_ra_context_t context;
};
#endif