16#ifndef LIEF_PE_SIGNER_INFO_H
17#define LIEF_PE_SIGNER_INFO_H
107 return digest_algorithm_;
113 return digest_enc_algorithm_;
119 return encrypted_digest_;
124 return authenticated_attributes_;
129 return unauthenticated_attributes_;
169 return raw_auth_data_;
180 uint32_t version_ = 0;
182 std::vector<uint8_t> serialno_;
189 std::vector<uint8_t> raw_auth_data_;
194 std::unique_ptr<x509> cert_;
Interface over PKCS #7 attribute.
Definition PE/signature/Attribute.hpp:29
TYPE
Definition PE/signature/Attribute.hpp:35
Main interface to parse PE binaries. In particular, the static Parser::parse functions should be used...
Definition PE/Parser.hpp:52
Definition SignatureParser.hpp:37
Main interface for the PKCS #7 signature scheme.
Definition Signature.hpp:40
friend class Signature
Definition SignerInfo.hpp:59
const Attribute * get_attribute(Attribute::TYPE type) const
Return the authenticated or un-authenticated attribute matching the given PE::SIG_ATTRIBUTE_TYPES.
const Attribute * get_auth_attribute(Attribute::TYPE type) const
Return the authenticated attribute matching the given PE::SIG_ATTRIBUTE_TYPES.
SignerInfo & operator=(SignerInfo other)
const Attribute * get_unauth_attribute(Attribute::TYPE type) const
Return the un-authenticated attribute matching the given PE::SIG_ATTRIBUTE_TYPES.
it_const_attributes_t unauthenticated_attributes() const
Iterator over LIEF::PE::Attribute for unauthenticated attributes.
Definition SignerInfo.hpp:128
SignerInfo(const SignerInfo &other)
void accept(Visitor &visitor) const override
const x509 * cert() const
x509 certificate used by this signer. If it can't be found, it returns a nullptr
Definition SignerInfo.hpp:157
span< const uint8_t > raw_auth_data() const
Raw blob that is signed by the signer certificate.
Definition SignerInfo.hpp:168
std::vector< std::unique_ptr< Attribute > > attributes_t
Internal container used to store both authenticated and unauthenticated attributes.
Definition SignerInfo.hpp:66
friend class SignatureParser
Definition SignerInfo.hpp:58
void swap(SignerInfo &other)
std::vector< uint8_t > encrypted_digest_t
Definition SignerInfo.hpp:62
span< const uint8_t > serial_number() const
Return the serial number associated with the x509 certificate used by this signer.
Definition SignerInfo.hpp:93
friend std::ostream & operator<<(std::ostream &os, const SignerInfo &signer_info)
SignerInfo & operator=(SignerInfo &&)
const std::string & issuer() const
Return the x509::issuer used by this signer.
Definition SignerInfo.hpp:98
friend class Parser
Definition SignerInfo.hpp:57
it_const_attributes_t authenticated_attributes() const
Iterator over LIEF::PE::Attribute for authenticated attributes.
Definition SignerInfo.hpp:123
const encrypted_digest_t & encrypted_digest() const
Return the signature created by the signing certificate's private key.
Definition SignerInfo.hpp:118
uint32_t version() const
Should be 1.
Definition SignerInfo.hpp:83
ALGORITHMS digest_algorithm() const
Algorithm (OID) used to hash the file.
Definition SignerInfo.hpp:106
ALGORITHMS encryption_algorithm() const
Return the (public-key) algorithm used to encrypt the signature.
Definition SignerInfo.hpp:112
const_ref_iterator< const attributes_t &, const Attribute * > it_const_attributes_t
Iterator which outputs const Attribute&.
Definition SignerInfo.hpp:69
x509 * cert()
x509 certificate used by this signer. If it can't be found, it returns a nullptr
Definition SignerInfo.hpp:163
SignerInfo(SignerInfo &&)
Interface over a x509 certificate.
Definition x509.hpp:43
Definition Visitor.hpp:212
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
ALGORITHMS
Cryptography algorithms.
Definition PE/enums.hpp:28
@ UNKNOWN
Definition PE/enums.hpp:29
LIEF namespace.
Definition Abstract/Binary.hpp:41
tcb::span< ElementType, Extent > span
Definition span.hpp:22
ref_iterator< CT, U, typename decay_t< CT >::const_iterator > const_ref_iterator
Iterator which returns a const ref on container's values.
Definition iterators.hpp:320
#define LIEF_API
Definition visibility.h:45