16#ifndef LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_IMPORT_H
17#define LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_IMPORT_H
37 enum class TYPE : uint32_t {
44 UNIQUE_ID = 0x00000001,
50 AUTHOR_ID = 0x00000002,
54 FAMILY_ID = 0x00000003,
58 IMAGE_ID = 0x00000004,
80 return min_security_version_;
103 return import_name_rva_;
122 min_security_version_ = value;
142 import_name_rva_ = value;
152 import_name_ = std::move(name);
168 TYPE type_ = TYPE::NONE;
169 uint32_t min_security_version_ = 0;
171 short_id_t family_id_ = {0};
172 short_id_t image_id_ = {0};
173 uint32_t import_name_rva_ = 0;
174 uint32_t reserved_ = 0;
176 std::string import_name_;
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:35
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:35
std::string_view import_name() const
Resolved import name.
Definition EnclaveImport.hpp:107
TYPE type() const
The type of identifier of the image that must match the value in the import record.
Definition EnclaveImport.hpp:70
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:102
EnclaveImport & type(TYPE ty)
Definition EnclaveImport.hpp:116
EnclaveImport & import_name(std::string name)
Definition EnclaveImport.hpp:151
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:86
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:79
const short_id_t & image_id() const
The image identifier of the primary module for the enclave.
Definition EnclaveImport.hpp:96
const short_id_t & family_id() const
The family identifier of the primary module for the enclave.
Definition EnclaveImport.hpp:91
std::array< uint8_t, 16 > short_id_t
Definition EnclaveImport.hpp:34
uint32_t reserved() const
Reserved. Should be 0.
Definition EnclaveImport.hpp:112
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:131
EnclaveImport & min_security_version(uint32_t value)
Definition EnclaveImport.hpp:121
std::string to_string() const
EnclaveImport & import_name_rva(uint32_t value)
Definition EnclaveImport.hpp:141
EnclaveImport(EnclaveImport &&)=default
TYPE
Definition EnclaveImport.hpp:37
EnclaveImport & image_id(const short_id_t &value)
Definition EnclaveImport.hpp:136
EnclaveImport & id(const long_id_t &value)
Definition EnclaveImport.hpp:126
EnclaveImport & reserved(uint32_t value)
Definition EnclaveImport.hpp:146
Main interface to parse PE binaries. In particular, the static Parser::parse functions should be used...
Definition PE/Parser.hpp:53
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:79
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
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:41
#define LIEF_API
Definition visibility.h:45
#define LIEF_LOCAL
Definition visibility.h:46