Go to the documentation of this file.
16#ifndef LIEF_PE_ATTRIBUTES_H
17#define LIEF_PE_ATTRIBUTES_H
32 friend class SignatureParser;
39 SIGNING_CERTIFICATE_V2,
42 SPC_RELAXED_PE_MARKER_CHECK,
46 MS_SPC_STATEMENT_TYPE,
47 MS_PLATFORM_MANIFEST_BINARY_ID,
49 PKCS9_AT_SEQUENCE_NUMBER,
50 PKCS9_COUNTER_SIGNATURE,
59 virtual std::unique_ptr<Attribute>
clone()
const = 0;
60 virtual TYPE
type()
const {
65 virtual std::string
print()
const = 0;
69 void accept(Visitor& visitor)
const override;
74 std::ostream&
operator<<(std::ostream& os,
const Attribute& attribute) {
75 os << attribute.
print();
81 static_assert(std::is_base_of<Attribute, T>::value,
82 "Require Attribute inheritance");
83 if (T::classof(
this)) {
84 return static_cast<const T*
>(
this);
91 return const_cast<T*
>(
static_cast<const Attribute*
>(
this)->cast<T>());
95 Attribute(TYPE type) :
98 TYPE type_ = TYPE::UNKNOWN;
Interface over PKCS #7 attribute.
Definition PE/signature/Attribute.hpp:29
~Attribute() override=default
friend std::ostream & operator<<(std::ostream &os, const Attribute &attribute)
Definition PE/signature/Attribute.hpp:74
virtual std::unique_ptr< Attribute > clone() const =0
Attribute(const Attribute &)=default
T * cast()
Definition PE/signature/Attribute.hpp:90
TYPE
Definition PE/signature/Attribute.hpp:35
const T * cast() const
Definition PE/signature/Attribute.hpp:80
virtual TYPE type() const
Concrete type of the attribute.
Definition PE/signature/Attribute.hpp:62
Attribute & operator=(const Attribute &)=default
void accept(Visitor &visitor) const override
virtual std::string print() const =0
Print information about the underlying attribute.
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
const char * to_string(DataDirectory::TYPES e)
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41