LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
PE
signature
attributes
MsSpcNestedSignature.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
* Copyright 2017 - 2026 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_ATTRIBUTES_MS_SPC_NESTED_SIG_H
17
#define LIEF_PE_ATTRIBUTES_MS_SPC_NESTED_SIG_H
18
19
#include "
LIEF/visibility.h
"
20
#include "
LIEF/PE/signature/Attribute.hpp
"
21
#include "
LIEF/PE/signature/Signature.hpp
"
22
23
24
namespace
LIEF
{
25
namespace
PE
{
26
36
class
LIEF_API
MsSpcNestedSignature
:
public
Attribute
{
37
38
friend
class
Parser
;
39
friend
class
SignatureParser
;
40
41
public
:
42
MsSpcNestedSignature
() =
delete
;
43
MsSpcNestedSignature
(
Signature
sig
) :
44
Attribute
(
Attribute
::
TYPE
::MS_SPC_NESTED_SIGN),
45
sig_{std::move(
sig
)}
46
{}
47
MsSpcNestedSignature
(
const
MsSpcNestedSignature
&) =
default
;
48
MsSpcNestedSignature
&
operator=
(
const
MsSpcNestedSignature
&) =
default
;
49
50
std::unique_ptr<Attribute>
clone
()
const override
{
51
return
std::unique_ptr<Attribute>(
new
MsSpcNestedSignature
{*
this
});
52
}
53
55
const
Signature
&
sig
()
const
{
56
return
sig_;
57
}
58
60
std::string
print
()
const override
;
61
62
void
accept
(
Visitor
& visitor)
const override
;
63
64
static
bool
classof
(
const
Attribute
* attr) {
65
return
attr->
type
() ==
Attribute::TYPE::MS_SPC_NESTED_SIGN
;
66
}
67
68
~MsSpcNestedSignature
()
override
=
default
;
69
70
private
:
71
Signature
sig_;
72
};
73
74
}
75
}
76
77
#endif
Attribute.hpp
Signature.hpp
LIEF::PE::Attribute::TYPE
TYPE
Definition
PE/signature/Attribute.hpp:35
LIEF::PE::Attribute::TYPE::MS_SPC_NESTED_SIGN
@ MS_SPC_NESTED_SIGN
Definition
PE/signature/Attribute.hpp:45
LIEF::PE::Attribute::Attribute
Attribute()=delete
LIEF::PE::Attribute::type
virtual TYPE type() const
Concrete type of the attribute.
Definition
PE/signature/Attribute.hpp:62
LIEF::PE::MsSpcNestedSignature::operator=
MsSpcNestedSignature & operator=(const MsSpcNestedSignature &)=default
LIEF::PE::MsSpcNestedSignature::sig
const Signature & sig() const
Underlying Signature object.
Definition
MsSpcNestedSignature.hpp:55
LIEF::PE::MsSpcNestedSignature::classof
static bool classof(const Attribute *attr)
Definition
MsSpcNestedSignature.hpp:64
LIEF::PE::MsSpcNestedSignature::MsSpcNestedSignature
MsSpcNestedSignature(Signature sig)
Definition
MsSpcNestedSignature.hpp:43
LIEF::PE::MsSpcNestedSignature::MsSpcNestedSignature
MsSpcNestedSignature()=delete
LIEF::PE::MsSpcNestedSignature::~MsSpcNestedSignature
~MsSpcNestedSignature() override=default
LIEF::PE::MsSpcNestedSignature::SignatureParser
friend class SignatureParser
Definition
MsSpcNestedSignature.hpp:39
LIEF::PE::MsSpcNestedSignature::MsSpcNestedSignature
MsSpcNestedSignature(const MsSpcNestedSignature &)=default
LIEF::PE::MsSpcNestedSignature::accept
void accept(Visitor &visitor) const override
LIEF::PE::MsSpcNestedSignature::Parser
friend class Parser
Definition
MsSpcNestedSignature.hpp:38
LIEF::PE::MsSpcNestedSignature::clone
std::unique_ptr< Attribute > clone() const override
Definition
MsSpcNestedSignature.hpp:50
LIEF::PE::MsSpcNestedSignature::print
std::string print() const override
Print information about the attribute.
LIEF::PE::Signature
Main interface for the PKCS #7 signature scheme.
Definition
Signature.hpp:39
LIEF::Visitor
Definition
Visitor.hpp:210
LIEF::PE
Namespace related to the LIEF's PE module.
Definition
Abstract/Header.hpp:32
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0