16#ifndef LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_CONFIG_H
17#define LIEF_PE_LOAD_CONFIGURATION_ENCLAVE_CONFIG_H
51 std::unique_ptr<EnclaveConfiguration>
clone()
const {
92 return imports_list_rva_;
98 return import_entry_size_;
104 return imports_.size();
129 return image_version_;
135 return security_version_;
141 return enclave_size_;
152 return enclave_flags_;
161 min_req_size_ = value;
166 policy_flags_ = value;
171 imports_list_rva_ = value;
176 import_entry_size_ = value;
191 image_version_ = value;
196 security_version_ = value;
201 enclave_size_ = value;
211 enclave_flags_ = value;
226 LIEF_LOCAL static std::unique_ptr<EnclaveConfiguration>
231 uint32_t min_req_size_ = 0;
232 uint32_t policy_flags_ = 0;
233 uint32_t imports_list_rva_ = 0;
234 uint32_t import_entry_size_ = 0;
235 id_array_t family_id_ = {0};
236 id_array_t image_id_ = {0};
237 uint32_t image_version_ = 0;
238 uint32_t security_version_ = 0;
239 uint64_t enclave_size_ = 0;
240 uint32_t nb_threads_ = 0;
241 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:218
std::unique_ptr< EnclaveConfiguration > clone() const
Definition EnclaveConfiguration.hpp:51
uint32_t size() const
The size of the IMAGE_ENCLAVE_CONFIG64/IMAGE_ENCLAVE_CONFIG32 structure, in bytes.
Definition EnclaveConfiguration.hpp:57
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:103
ref_iterator< imports_t & > it_imports
Definition EnclaveConfiguration.hpp:41
EnclaveConfiguration & enclave_flags(uint32_t value)
Definition EnclaveConfiguration.hpp:210
uint64_t enclave_size() const
The expected virtual size of the private address range for the enclave, in bytes.
Definition EnclaveConfiguration.hpp:140
EnclaveConfiguration & operator=(EnclaveConfiguration &&)=default
EnclaveConfiguration()=default
EnclaveConfiguration & min_required_config_size(uint32_t value)
Definition EnclaveConfiguration.hpp:160
static constexpr auto MIN_SIZE
Definition EnclaveConfiguration.hpp:34
const_ref_iterator< const imports_t & > it_const_imports
Definition EnclaveConfiguration.hpp:42
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:91
EnclaveConfiguration & image_version(uint32_t value)
Definition EnclaveConfiguration.hpp:190
EnclaveConfiguration & enclave_size(uint64_t value)
Definition EnclaveConfiguration.hpp:200
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:97
EnclaveConfiguration(const EnclaveConfiguration &)=default
it_const_imports imports() const
Definition EnclaveConfiguration.hpp:112
std::array< uint8_t, 16 > id_array_t
Definition EnclaveConfiguration.hpp:38
EnclaveConfiguration & policy_flags(uint32_t value)
Definition EnclaveConfiguration.hpp:165
uint32_t image_version() const
The version number that the author of the enclave assigned to the enclave.
Definition EnclaveConfiguration.hpp:128
EnclaveConfiguration & image_id(const id_array_t &value)
Definition EnclaveConfiguration.hpp:185
uint32_t nb_threads() const
The maximum number of threads that can be created within the enclave.
Definition EnclaveConfiguration.hpp:145
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:75
std::vector< EnclaveImport > imports_t
Definition EnclaveConfiguration.hpp:40
EnclaveConfiguration & size(uint32_t value)
Definition EnclaveConfiguration.hpp:155
uint32_t policy_flags() const
A flag that indicates whether the enclave permits debugging.
Definition EnclaveConfiguration.hpp:80
EnclaveConfiguration & import_entry_size(uint32_t value)
Definition EnclaveConfiguration.hpp:175
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:151
uint32_t security_version() const
The security version number that the author of the enclave assigned to the enclave.
Definition EnclaveConfiguration.hpp:134
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:123
std::string to_string() const
EnclaveConfiguration & security_version(uint32_t value)
Definition EnclaveConfiguration.hpp:195
bool is_debuggable() const
Whether this enclave can be debugged.
Definition EnclaveConfiguration.hpp:85
it_imports imports()
Return an iterator over the enclave's imports.
Definition EnclaveConfiguration.hpp:108
EnclaveConfiguration(EnclaveConfiguration &&)=default
EnclaveConfiguration & nb_threads(uint32_t value)
Definition EnclaveConfiguration.hpp:205
const id_array_t & family_id() const
The family identifier that the author of the enclave assigned to the enclave.
Definition EnclaveConfiguration.hpp:118
EnclaveConfiguration & family_id(const id_array_t &value)
Definition EnclaveConfiguration.hpp:180
EnclaveConfiguration & operator=(const EnclaveConfiguration &)=default
EnclaveConfiguration & import_list_rva(uint32_t value)
Definition EnclaveConfiguration.hpp:170
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