LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
SigningCertificateV2.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2023 R. Thomas
2 * Copyright 2017 - 2023 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_SIGNING_CERTIFICATE_V2_H
17#define LIEF_PE_ATTRIBUTES_SIGNING_CERTIFICATE_V2_H
18
19#include "LIEF/visibility.h"
21
22namespace LIEF {
23namespace PE {class LIEF_API SigningCertificateV2 : public Attribute {
45 friend class Parser;
46 friend class SignatureParser;
47
48 public:
50 Attribute(Attribute::TYPE::SIGNING_CERTIFICATE_V2)
51 {}
52 SigningCertificateV2(const SigningCertificateV2&) = default;
53 SigningCertificateV2& operator=(const SigningCertificateV2&) = default;
54
55 std::unique_ptr<Attribute> clone() const override {
56 return std::unique_ptr<Attribute>(new SigningCertificateV2{*this});
57 }
58
59 static bool classof(const Attribute* attr) {
60 return attr->type() == Attribute::TYPE::SIGNING_CERTIFICATE_V2;
61 }
62
63 std::string print() const override;
64
65 void accept(Visitor& visitor) const override;
66
67 ~SigningCertificateV2() override = default;
68};
69
70}
71}
72
73#endif
Interface over PKCS #7 attribute.
Definition PE/signature/Attribute.hpp:29
virtual TYPE type() const
Concrete type of the attribute.
Definition PE/signature/Attribute.hpp:62
SigningCertificateV2 ::= SEQUENCE { certs SEQUENCE OF ESSCertIDv2, policies SEQUENCE OF PolicyInforma...
Definition SigningCertificateV2.hpp:44
SigningCertificateV2 & operator=(const SigningCertificateV2 &)=default
SigningCertificateV2()
Definition SigningCertificateV2.hpp:49
std::unique_ptr< Attribute > clone() const override
Definition SigningCertificateV2.hpp:55
void accept(Visitor &visitor) const override
std::string print() const override
Print information about the underlying attribute.
SigningCertificateV2(const SigningCertificateV2 &)=default
~SigningCertificateV2() override=default
static bool classof(const Attribute *attr)
Definition SigningCertificateV2.hpp:59
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41