LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LoadConfigurationV2.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2024 R. Thomas
2 * Copyright 2017 - 2024 Quarkslab
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef LIEF_PE_LOAD_CONFIGURATION_V2_H
17#define LIEF_PE_LOAD_CONFIGURATION_V2_H
18#include <ostream>
19
20#include "LIEF/visibility.h"
21
24
25namespace LIEF {
26namespace PE {
27
28namespace details {
29template<class T>
31}
35 public:
36 static constexpr VERSION WIN_VERSION = VERSION::WIN_10_0_9879;
37
39
40 LoadConfigurationV2& operator=(const LoadConfigurationV2&) = default;
41 LoadConfigurationV2(const LoadConfigurationV2&) = default;
42
43 template<class T>
44 LIEF_LOCAL LoadConfigurationV2(const details::load_configuration_v2<T>& header);
45
46 VERSION version() const override {
47 return WIN_VERSION;
48 }
49 const CodeIntegrity& code_integrity() const {
52 return code_integrity_;
53 }
54
55 CodeIntegrity& code_integrity() {
56 return code_integrity_;
57 }
58
59 static bool classof(const LoadConfiguration* config) {
60 return config->version() == WIN_VERSION;
61 }
62
63 ~LoadConfigurationV2() override = default;
64
65 void accept(Visitor& visitor) const override;
66
67 std::ostream& print(std::ostream& os) const override;
68
69 protected:
70 CodeIntegrity code_integrity_;
71};
72}
73}
74
75#endif
LoadConfiguration enhanced with Control Flow Guard.
Definition LoadConfigurationV1.hpp:36
LoadConfiguration enhanced with code integrity.
Definition LoadConfigurationV2.hpp:34
static bool classof(const LoadConfiguration *config)
Definition LoadConfigurationV2.hpp:59
LoadConfigurationV2()=default
~LoadConfigurationV2() override=default
LoadConfigurationV2 & operator=(const LoadConfigurationV2 &)=default
LoadConfigurationV2(const LoadConfigurationV2 &)=default
const CodeIntegrity & code_integrity() const
CodeIntegrity associated with.
Definition LoadConfigurationV2.hpp:51
std::ostream & print(std::ostream &os) const override
VERSION version() const override
(SDK) Version of the structure
Definition LoadConfigurationV2.hpp:46
CodeIntegrity & code_integrity()
Definition LoadConfigurationV2.hpp:55
LoadConfigurationV2(const details::load_configuration_v2< T > &header)
void accept(Visitor &visitor) const override
virtual VERSION version() const
(SDK) Version of the structure
Definition LoadConfiguration.hpp:64
Definition CodeIntegrity.hpp:26
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:36
Definition LoadConfigurationV2.hpp:30
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42