LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
PKCS9CounterSignature.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef LIEF_PE_ATTRIBUTES_PKCS9_COUNTER_SIG_H
16#define LIEF_PE_ATTRIBUTES_PKCS9_COUNTER_SIG_H
17
20#include "LIEF/visibility.h"
21
22namespace LIEF {
23class VectorStream;
24namespace PE {
25
40
41 friend class Parser;
42 friend class SignatureParser;
43
44 public:
47 Attribute(Attribute::TYPE::PKCS9_COUNTER_SIGNATURE),
48 signer_{std::move(signer)} {}
49
52
53 std::unique_ptr<Attribute> clone() const override {
54 return std::unique_ptr<Attribute>(new PKCS9CounterSignature{*this});
55 }
56
59 return signer_;
60 }
61
63 std::string print() const override;
64
65 static bool classof(const Attribute* attr) {
67 }
68
69 void accept(Visitor& visitor) const override;
70
71 ~PKCS9CounterSignature() override = default;
72
73 private:
74 SignerInfo signer_;
75};
76
77}
78}
79
80#endif
TYPE
Definition PE/signature/Attribute.hpp:34
@ PKCS9_COUNTER_SIGNATURE
Definition PE/signature/Attribute.hpp:49
virtual TYPE type() const
Concrete type of the attribute.
Definition PE/signature/Attribute.hpp:61
PKCS9CounterSignature(SignerInfo signer)
Definition PKCS9CounterSignature.hpp:46
static bool classof(const Attribute *attr)
Definition PKCS9CounterSignature.hpp:65
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:53
PKCS9CounterSignature(const PKCS9CounterSignature &)=default
friend class SignatureParser
Definition PKCS9CounterSignature.hpp:42
const SignerInfo & signer() const
SignerInfo as described in the RFC #2985.
Definition PKCS9CounterSignature.hpp:58
friend class Parser
Definition PKCS9CounterSignature.hpp:41
PKCS9CounterSignature & operator=(const PKCS9CounterSignature &)=default
Definition SignerInfo.hpp:55
Definition VectorStream.hpp:28
Definition Visitor.hpp:211
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:31
LIEF namespace.
Definition Abstract/Binary.hpp:41
#define LIEF_API
Definition visibility.h:44