LIEF: Library to Instrument Executable Formats Version 0.15.1
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"
23
24namespace LIEF {
25namespace PE {
26
59 friend class SignatureParser;
60
61 public:
62 static constexpr auto PKCS9_TSTINFO_OBJID = "1.2.840.113549.1.9.16.1.4";
66 PKCS9TSTInfo(const PKCS9TSTInfo&) = default;
68
69 std::unique_ptr<Content> clone() const override {
70 return std::unique_ptr<Content>(new PKCS9TSTInfo{*this});
71 }
72
73 void print(std::ostream& /*os*/) const override {
74 return;
75 }
76
77 void accept(Visitor& visitor) const override;
78
79 ~PKCS9TSTInfo() override = default;
80
81 static bool classof(const ContentInfo::Content* content) {
82 return content->content_type() == PKCS9_TSTINFO_OBJID;
83 }
84
85 private:
86 uint32_t version_;
87};
88}
89}
90#endif
Definition ContentInfo.hpp:83
const oid_t & content_type() const
Definition ContentInfo.hpp:89
Content(oid_t oid)
Definition ContentInfo.hpp:85
Definition ContentInfo.hpp:78
Interface over the structure described by the OID 1.2.840.113549.1.9.16.1.4 (PKCS #9)
Definition PKCS9TSTInfo.hpp:58
void print(std::ostream &) const override
Definition PKCS9TSTInfo.hpp:73
static bool classof(const ContentInfo::Content *content)
Definition PKCS9TSTInfo.hpp:81
static constexpr auto PKCS9_TSTINFO_OBJID
Definition PKCS9TSTInfo.hpp:62
PKCS9TSTInfo & operator=(const PKCS9TSTInfo &)=default
void accept(Visitor &visitor) const override
PKCS9TSTInfo()
Definition PKCS9TSTInfo.hpp:63
std::unique_ptr< Content > clone() const override
Definition PKCS9TSTInfo.hpp:69
~PKCS9TSTInfo() override=default
PKCS9TSTInfo(const PKCS9TSTInfo &)=default
Definition SignatureParser.hpp:37
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32