16#ifndef LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_CONFIG_H
17#define LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_CONFIG_H
52 std::unique_ptr<EnclaveConfiguration>
clone()
const {
93 return imports_list_rva_;
99 return import_entry_size_;
105 return imports_.size();
130 return image_version_;
136 return security_version_;
142 return enclave_size_;
153 return enclave_flags_;
162 min_req_size_ = value;
167 policy_flags_ = value;
172 imports_list_rva_ = value;
177 import_entry_size_ = value;
192 image_version_ = value;
197 security_version_ = value;
202 enclave_size_ = value;
212 enclave_flags_ = value;
227 LIEF_LOCAL static std::unique_ptr<EnclaveConfiguration>
232 uint32_t min_req_size_ = 0;
233 uint32_t policy_flags_ = 0;
234 uint32_t imports_list_rva_ = 0;
235 uint32_t import_entry_size_ = 0;
236 id_array_t family_id_ = {0};
237 id_array_t image_id_ = {0};
238 uint32_t image_version_ = 0;
239 uint32_t security_version_ = 0;
240 uint64_t enclave_size_ = 0;
241 uint32_t nb_threads_ = 0;
242 uint32_t enclave_flags_ = 0;
Class that is used to a read stream of data from different sources.
Definition BinaryStream.hpp:33
friend std::ostream & operator<<(std::ostream &os, const EnclaveConfiguration &meta)
Definition EnclaveConfiguration.hpp:219
std::unique_ptr< EnclaveConfiguration > clone() const
Definition EnclaveConfiguration.hpp:52
uint32_t size() const
The size of the IMAGE_ENCLAVE_CONFIG64/IMAGE_ENCLAVE_CONFIG32 structure, in bytes.
Definition EnclaveConfiguration.hpp:58
size_t nb_imports() const
The number of images in the array of images that the import_list_rva() member points to.
Definition EnclaveConfiguration.hpp:104
ref_iterator< imports_t & > it_imports
Definition EnclaveConfiguration.hpp:42
EnclaveConfiguration & enclave_flags(uint32_t value)
Definition EnclaveConfiguration.hpp:211
uint64_t enclave_size() const
The expected virtual size of the private address range for the enclave, in bytes.
Definition EnclaveConfiguration.hpp:141
EnclaveConfiguration & operator=(EnclaveConfiguration &&)=default
EnclaveConfiguration()=default
EnclaveConfiguration & min_required_config_size(uint32_t value)
Definition EnclaveConfiguration.hpp:161
static constexpr auto MIN_SIZE
Definition EnclaveConfiguration.hpp:34
const_ref_iterator< const imports_t & > it_const_imports
Definition EnclaveConfiguration.hpp:43
uint32_t import_list_rva() const
The RVA of the array of images that the enclave image may import, with identity information for each ...
Definition EnclaveConfiguration.hpp:92
EnclaveConfiguration & image_version(uint32_t value)
Definition EnclaveConfiguration.hpp:191
EnclaveConfiguration & enclave_size(uint64_t value)
Definition EnclaveConfiguration.hpp:201
uint32_t import_entry_size() const
The size of each image in the array of images that the import_list_rva() member points to.
Definition EnclaveConfiguration.hpp:98
EnclaveConfiguration(const EnclaveConfiguration &)=default
it_const_imports imports() const
Definition EnclaveConfiguration.hpp:113
std::array< uint8_t, 16 > id_array_t
Definition EnclaveConfiguration.hpp:39
EnclaveConfiguration & policy_flags(uint32_t value)
Definition EnclaveConfiguration.hpp:166
uint32_t image_version() const
The version number that the author of the enclave assigned to the enclave.
Definition EnclaveConfiguration.hpp:129
EnclaveConfiguration & image_id(const id_array_t &value)
Definition EnclaveConfiguration.hpp:186
uint32_t nb_threads() const
The maximum number of threads that can be created within the enclave.
Definition EnclaveConfiguration.hpp:146
uint32_t min_required_config_size() const
The minimum size of the IMAGE_ENCLAVE_CONFIG(32,64) structure that the image loader must be able to p...
Definition EnclaveConfiguration.hpp:76
std::vector< EnclaveImport > imports_t
Definition EnclaveConfiguration.hpp:41
EnclaveConfiguration & size(uint32_t value)
Definition EnclaveConfiguration.hpp:156
uint32_t policy_flags() const
A flag that indicates whether the enclave permits debugging.
Definition EnclaveConfiguration.hpp:81
EnclaveConfiguration & import_entry_size(uint32_t value)
Definition EnclaveConfiguration.hpp:176
static constexpr auto POLICY_STRICT_MEMORY
Definition EnclaveConfiguration.hpp:37
uint32_t enclave_flags() const
A flag that indicates whether the image is suitable for use as the primary image in the enclave.
Definition EnclaveConfiguration.hpp:152
uint32_t security_version() const
The security version number that the author of the enclave assigned to the enclave.
Definition EnclaveConfiguration.hpp:135
static constexpr auto POLICY_DEBUGGABLE
Definition EnclaveConfiguration.hpp:36
const id_array_t & image_id() const
The image identifier that the author of the enclave assigned to the enclave.
Definition EnclaveConfiguration.hpp:124
std::string to_string() const
EnclaveConfiguration & security_version(uint32_t value)
Definition EnclaveConfiguration.hpp:196
bool is_debuggable() const
Whether this enclave can be debugged.
Definition EnclaveConfiguration.hpp:86
it_imports imports()
Return an iterator over the enclave's imports.
Definition EnclaveConfiguration.hpp:109
EnclaveConfiguration(EnclaveConfiguration &&)=default
EnclaveConfiguration & nb_threads(uint32_t value)
Definition EnclaveConfiguration.hpp:206
const id_array_t & family_id() const
The family identifier that the author of the enclave assigned to the enclave.
Definition EnclaveConfiguration.hpp:119
EnclaveConfiguration & family_id(const id_array_t &value)
Definition EnclaveConfiguration.hpp:181
EnclaveConfiguration & operator=(const EnclaveConfiguration &)=default
EnclaveConfiguration & import_list_rva(uint32_t value)
Definition EnclaveConfiguration.hpp:171
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:52
Iterator which returns reference on container's values.
Definition iterators.hpp:46
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:40
ref_iterator< CT, U, typename decay_t< CT >::const_iterator > const_ref_iterator
Iterator which return const ref on container's values.
Definition iterators.hpp:257
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42