LIEF: Library to Instrument Executable Formats Version 0.15.1
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}
32
35 public:
36 static constexpr VERSION WIN_VERSION = VERSION::WIN_10_0_9879;
37
39
42
43 template<class T>
45
46 VERSION version() const override {
47 return WIN_VERSION;
48 }
49
52 return code_integrity_;
53 }
54
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
static bool classof(const LoadConfiguration *config)
Definition LoadConfigurationV2.hpp:59
~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
Class that represents the default PE's LoadConfiguration
Definition LoadConfiguration.hpp:35
virtual VERSION version() const
(SDK) Version of the structure
Definition LoadConfiguration.hpp:64
VERSION
Definition LoadConfiguration.hpp:37
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32
Definition LoadConfigurationV2.hpp:30
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42