LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
PKCS9TSTInfo.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_PKCS9_TSTINFO_H
17#define LIEF_PE_PKCS9_TSTINFO_H
18#include <ostream>
19#include <memory>
20
21#include "LIEF/Visitor.hpp"
22#include "LIEF/visibility.h"
24
25namespace LIEF {
26namespace PE {
60 friend class SignatureParser;
61
62 public:
63 static constexpr auto PKCS9_TSTINFO_OBJID = "1.2.840.113549.1.9.16.1.4";
65 ContentInfo::Content(PKCS9_TSTINFO_OBJID)
66 {}
67 PKCS9TSTInfo(const PKCS9TSTInfo&) = default;
68 PKCS9TSTInfo& operator=(const PKCS9TSTInfo&) = default;
69
70 std::unique_ptr<Content> clone() const override {
71 return std::unique_ptr<Content>(new PKCS9TSTInfo{*this});
72 }
73
74 void print(std::ostream& /*os*/) const override {
75 return;
76 }
77
78 void accept(Visitor& visitor) const override;
79
80 ~PKCS9TSTInfo() override = default;
81
82 static bool classof(const ContentInfo::Content* content) {
83 return content->content_type() == PKCS9_TSTINFO_OBJID;
84 }
85
86 private:
87 uint32_t version_;
88};
89}
90}
91#endif
Definition ContentInfo.hpp:83
const oid_t & content_type() const
Definition ContentInfo.hpp:89
Interface over the structure described by the OID 1.2.840.113549.1.9.16.1.4 (PKCS #9)
Definition PKCS9TSTInfo.hpp:59
void print(std::ostream &) const override
Definition PKCS9TSTInfo.hpp:74
static bool classof(const ContentInfo::Content *content)
Definition PKCS9TSTInfo.hpp:82
PKCS9TSTInfo & operator=(const PKCS9TSTInfo &)=default
void accept(Visitor &visitor) const override
PKCS9TSTInfo()
Definition PKCS9TSTInfo.hpp:64
std::unique_ptr< Content > clone() const override
Definition PKCS9TSTInfo.hpp:70
~PKCS9TSTInfo() override=default
PKCS9TSTInfo(const PKCS9TSTInfo &)=default
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