LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
MsSpcNestedSignature.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_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
24namespace LIEF {
25class VectorStream;
26namespace PE {
27
37class LIEF_API MsSpcNestedSignature : public Attribute {
38
39 friend class Parser;
40 friend class SignatureParser;
41
42 public:
43 MsSpcNestedSignature() = delete;
45 Attribute(Attribute::TYPE::MS_SPC_NESTED_SIGN),
46 sig_{std::move(sig)}
47 {}
49 MsSpcNestedSignature& operator=(const MsSpcNestedSignature&) = default;
50
51 std::unique_ptr<Attribute> clone() const override {
52 return std::unique_ptr<Attribute>(new MsSpcNestedSignature{*this});
53 }
54
56 const Signature& sig() const {
57 return sig_;
58 }
59
61 std::string print() const override;
62
63 void accept(Visitor& visitor) const override;
64
65 static bool classof(const Attribute* attr) {
66 return attr->type() == Attribute::TYPE::MS_SPC_NESTED_SIGN;
67 }
68
69 ~MsSpcNestedSignature() override = default;
70
71 private:
72 Signature sig_;
73};
74
75}
76}
77
78#endif
Interface over PKCS #7 attribute.
Definition Attribute.hpp:28
virtual TYPE type() const
Concrete type of the attribute.
Definition Attribute.hpp:58
Interface over the structure described by the OID 1.3.6.1.4.1.311.2.4.1
Definition MsSpcNestedSignature.hpp:37
const Signature & sig() const
Underlying Signature object.
Definition MsSpcNestedSignature.hpp:56
std::string print() const override
Print information about the attribute.
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition PE/Parser.hpp:47
Definition SignatureParser.hpp:37
Main interface for the PKCS #7 signature scheme.
Definition Signature.hpp:39
Definition Visitor.hpp:221
LIEF namespace.
Definition Abstract/Binary.hpp:31