16#ifndef LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_IMPORT_H
17#define LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_IMPORT_H
36 enum class TYPE : uint32_t {
79 return min_security_version_;
102 return import_name_rva_;
121 min_security_version_ = value;
141 import_name_rva_ = value;
151 import_name_ = std::move(name);
169 TYPE type_ = TYPE::NONE;
170 uint32_t min_security_version_ = 0;
172 short_id_t family_id_ = {0};
173 short_id_t image_id_ = {0};
174 uint32_t import_name_rva_ = 0;
175 uint32_t reserved_ = 0;
177 std::string import_name_;
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
This class represents the enclave configuration.
Definition EnclaveConfiguration.hpp:32
EnclaveImport & operator=(const EnclaveImport &)=default
std::array< uint8_t, 32 > long_id_t
Definition EnclaveImport.hpp:34
TYPE type() const
The type of identifier of the image that must match the value in the import record.
Definition EnclaveImport.hpp:69
uint32_t import_name_rva() const
The relative virtual address of a NULL-terminated string that contains the same value found in the im...
Definition EnclaveImport.hpp:101
EnclaveImport & type(TYPE ty)
Definition EnclaveImport.hpp:115
EnclaveImport & import_name(std::string name)
Definition EnclaveImport.hpp:150
const long_id_t & id() const
The unique identifier of the primary module for the enclave, if the type() is TYPE::UNIQUE_ID....
Definition EnclaveImport.hpp:85
EnclaveImport & operator=(EnclaveImport &&)=default
uint32_t min_security_version() const
The minimum enclave security version that each image must have for the image to be imported successfu...
Definition EnclaveImport.hpp:78
const short_id_t & image_id() const
The image identifier of the primary module for the enclave.
Definition EnclaveImport.hpp:95
const short_id_t & family_id() const
The family identifier of the primary module for the enclave.
Definition EnclaveImport.hpp:90
std::array< uint8_t, 16 > short_id_t
Definition EnclaveImport.hpp:33
uint32_t reserved() const
Reserved. Should be 0.
Definition EnclaveImport.hpp:111
EnclaveImport(const EnclaveImport &)=default
friend std::ostream & operator<<(std::ostream &os, const EnclaveImport &meta)
Definition EnclaveImport.hpp:158
EnclaveImport & family_id(const short_id_t &value)
Definition EnclaveImport.hpp:130
EnclaveImport & min_security_version(uint32_t value)
Definition EnclaveImport.hpp:120
std::string to_string() const
EnclaveImport & import_name_rva(uint32_t value)
Definition EnclaveImport.hpp:140
EnclaveImport(EnclaveImport &&)=default
TYPE
Definition EnclaveImport.hpp:36
@ FAMILY_ID
The value of the enclave family identifier of the image must match the value in the import record....
Definition EnclaveImport.hpp:53
@ UNIQUE_ID
The value of the enclave unique identifier of the image must match the value in the import record....
Definition EnclaveImport.hpp:43
@ IMAGE_ID
The value of the enclave image identifier of the image must match the value in the import record....
Definition EnclaveImport.hpp:57
@ AUTHOR_ID
The value of the enclave author identifier of the image must match the value in the import record....
Definition EnclaveImport.hpp:49
@ NONE
None of the identifiers of the image need to match the value in the import record.
Definition EnclaveImport.hpp:39
EnclaveImport & image_id(const short_id_t &value)
Definition EnclaveImport.hpp:135
EnclaveImport & id(const long_id_t &value)
Definition EnclaveImport.hpp:125
const std::string & import_name() const
Resolved import name.
Definition EnclaveImport.hpp:106
EnclaveImport & reserved(uint32_t value)
Definition EnclaveImport.hpp:145
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:52
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:75
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
const char * to_string(CODE_PAGES e)
LIEF namespace.
Definition Abstract/Binary.hpp:40
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42