LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
PKCS9CounterSignature.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_PKCS9_COUNTER_SIG_H
17#define LIEF_PE_ATTRIBUTES_PKCS9_COUNTER_SIG_H
18
19#include "LIEF/visibility.h"
22
23namespace LIEF {
24class VectorStream;
25namespace PE {
26
41
42 friend class Parser;
43 friend class SignatureParser;
44
45 public:
48 Attribute(Attribute::TYPE::PKCS9_COUNTER_SIGNATURE),
49 signer_{std::move(signer)} {}
50
53
54 std::unique_ptr<Attribute> clone() const override {
55 return std::unique_ptr<Attribute>(new PKCS9CounterSignature{*this});
56 }
57
60 return this->signer_;
61 }
62
64 std::string print() const override;
65
66 static bool classof(const Attribute* attr) {
68 }
69
70 void accept(Visitor& visitor) const override;
71
72 ~PKCS9CounterSignature() override = default;
73
74 private:
75 SignerInfo signer_;
76};
77
78}
79}
80
81#endif
TYPE
Definition PE/signature/Attribute.hpp:35
@ PKCS9_COUNTER_SIGNATURE
Definition PE/signature/Attribute.hpp:50
virtual TYPE type() const
Concrete type of the attribute.
Definition PE/signature/Attribute.hpp:62
PKCS9CounterSignature(SignerInfo signer)
Definition PKCS9CounterSignature.hpp:47
static bool classof(const Attribute *attr)
Definition PKCS9CounterSignature.hpp:66
std::string print() const override
Print information about the attribute.
void accept(Visitor &visitor) const override
~PKCS9CounterSignature() override=default
std::unique_ptr< Attribute > clone() const override
Definition PKCS9CounterSignature.hpp:54
PKCS9CounterSignature(const PKCS9CounterSignature &)=default
friend class SignatureParser
Definition PKCS9CounterSignature.hpp:43
const SignerInfo & signer() const
SignerInfo as described in the RFC #2985.
Definition PKCS9CounterSignature.hpp:59
friend class Parser
Definition PKCS9CounterSignature.hpp:42
PKCS9CounterSignature & operator=(const PKCS9CounterSignature &)=default
Definition SignerInfo.hpp:55
Definition VectorStream.hpp:29
Definition Visitor.hpp:212
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:40
#define LIEF_API
Definition visibility.h:45