LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
LoadConfigurationV2.hpp
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
22#include "LIEF/PE/CodeIntegrity.hpp"
23#include "LIEF/PE/LoadConfigurations/LoadConfigurationV1.hpp"
24
25namespace LIEF {
26namespace PE {
27
28namespace details {
29template<class T>
31}
32
35 public:
36 static constexpr VERSION WIN_VERSION = VERSION::WIN_10_0_9879;
37
38 LoadConfigurationV2() = default;
39
40 LoadConfigurationV2& operator=(const LoadConfigurationV2&) = default;
42
43 template<class T>
45
46 VERSION version() const override {
47 return WIN_VERSION;
48 }
49
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
Definition CodeIntegrity.hpp:30
LoadConfiguration enhanced with Control Flow Guard.
Definition LoadConfigurationV1.hpp:36
LoadConfiguration enhanced with code integrity.
Definition LoadConfigurationV2.hpp:34
const CodeIntegrity & code_integrity() const
CodeIntegrity associated with.
Definition LoadConfigurationV2.hpp:51
VERSION version() const override
(SDK) Version of the structure
Definition LoadConfigurationV2.hpp:46
LIEF namespace.
Definition Abstract/Binary.hpp:32
Definition LoadConfigurationV2.hpp:30