LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_IMPORT_H
17#define LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_IMPORT_H
33 using short_id_t = std::array<uint8_t, 16>;
34 using long_id_t = std::array<uint8_t, 32>;
36 enum class TYPE : uint32_t { NONE = 0x00000000,
40 UNIQUE_ID = 0x00000001,
44 AUTHOR_ID = 0x00000002,
50 FAMILY_ID = 0x00000003,
54 IMAGE_ID = 0x00000004,
62 EnclaveImport&
operator=(
const EnclaveImport&) =
default;
65 EnclaveImport&
operator=(EnclaveImport&&) =
default;
79 return min_security_version_;
81 const long_id_t&
id()
const {
102 return import_name_rva_;
121 min_security_version_ = value;
125 EnclaveImport&
id(
const long_id_t& value) {
141 import_name_rva_ = value;
151 import_name_ = std::move(name);
158 std::ostream&
operator<<(std::ostream& os,
const EnclaveImport& meta)
166 parse(Parser& ctx, BinaryStream& stream);
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
Defines an entry in the array of images that an enclave can import.
Definition EnclaveImport.hpp:31
EnclaveImport & operator=(const EnclaveImport &)=default
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
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
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
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
const char * to_string(AuxiliaryWeakExternal::CHARACTERISTICS e)
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42