LIEF: Library to Instrument Executable Formats Version 0.16.0
|
#include <SignerInfo.hpp>
Public Types | |
using | encrypted_digest_t = std::vector<uint8_t> |
using | attributes_t = std::vector<std::unique_ptr<Attribute>> |
Internal container used to store both authenticated and unauthenticated attributes. | |
using | it_const_attributes_t = const_ref_iterator<const attributes_t&, const Attribute*> |
Iterator which outputs const Attribute&. | |
Public Types inherited from LIEF::Object | |
template<class T > | |
using | output_t = add_pointer_t<decay_t<T>> |
template<class T > | |
using | output_const_t = add_pointer_t<add_const_t<decay_t<T>>> |
Public Member Functions | |
SignerInfo () | |
SignerInfo (const SignerInfo &other) | |
SignerInfo & | operator= (SignerInfo other) |
SignerInfo (SignerInfo &&) | |
SignerInfo & | operator= (SignerInfo &&) |
void | swap (SignerInfo &other) |
uint32_t | version () const |
Should be 1. | |
span< const uint8_t > | serial_number () const |
Return the serial number associated with the x509 certificate used by this signer. | |
const std::string & | issuer () const |
Return the x509::issuer used by this signer. | |
ALGORITHMS | digest_algorithm () const |
Algorithm (OID) used to hash the file. | |
ALGORITHMS | encryption_algorithm () const |
Return the (public-key) algorithm used to encrypt the signature. | |
const encrypted_digest_t & | encrypted_digest () const |
Return the signature created by the signing certificate's private key. | |
it_const_attributes_t | authenticated_attributes () const |
Iterator over LIEF::PE::Attribute for authenticated attributes. | |
it_const_attributes_t | unauthenticated_attributes () const |
Iterator over LIEF::PE::Attribute for unauthenticated attributes. | |
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. | |
const Attribute * | get_unauth_attribute (Attribute::TYPE type) const |
Return the un-authenticated attribute matching the given PE::SIG_ATTRIBUTE_TYPES. | |
const x509 * | cert () const |
x509 certificate used by this signer. If it can't be found, it returns a nullptr | |
x509 * | cert () |
x509 certificate used by this signer. If it can't be found, it returns a nullptr | |
span< const uint8_t > | raw_auth_data () const |
Raw blob that is signed by the signer certificate. | |
void | accept (Visitor &visitor) const override |
~SignerInfo () override | |
Public Member Functions inherited from LIEF::Object | |
Object () | |
Object (const Object &other) | |
Object & | operator= (const Object &other) |
template<class T > | |
output_t< T > | as () |
template<class T > | |
output_const_t< T > | as () const |
virtual bool | operator== (const Object &other) const |
virtual bool | operator!= (const Object &other) const |
virtual | ~Object () |
SignerInfo as described in the RFC 2315
using LIEF::PE::SignerInfo::attributes_t = std::vector<std::unique_ptr<Attribute>> |
Internal container used to store both authenticated and unauthenticated attributes.
using LIEF::PE::SignerInfo::encrypted_digest_t = std::vector<uint8_t> |
using LIEF::PE::SignerInfo::it_const_attributes_t = const_ref_iterator<const attributes_t&, const Attribute*> |
Iterator which outputs const Attribute&.
LIEF::PE::SignerInfo::SignerInfo | ( | ) |
LIEF::PE::SignerInfo::SignerInfo | ( | const SignerInfo & | other | ) |
LIEF::PE::SignerInfo::SignerInfo | ( | SignerInfo && | ) |
|
override |
|
overridevirtual |
Implements LIEF::Object.
|
inline |
Iterator over LIEF::PE::Attribute for authenticated attributes.
|
inline |
x509 certificate used by this signer. If it can't be found, it returns a nullptr
|
inline |
x509 certificate used by this signer. If it can't be found, it returns a nullptr
|
inline |
Algorithm (OID) used to hash the file.
This value should match LIEF::PE::ContentInfo::digest_algorithm and LIEF::PE::Signature::digest_algorithm
|
inline |
Return the signature created by the signing certificate's private key.
|
inline |
Return the (public-key) algorithm used to encrypt the signature.
const Attribute * LIEF::PE::SignerInfo::get_attribute | ( | Attribute::TYPE | type | ) | const |
Return the authenticated or un-authenticated attribute matching the given PE::SIG_ATTRIBUTE_TYPES.
It returns the first entry that matches the given type. If it can't be found, it returns a nullptr.
const Attribute * LIEF::PE::SignerInfo::get_auth_attribute | ( | Attribute::TYPE | type | ) | const |
Return the authenticated attribute matching the given PE::SIG_ATTRIBUTE_TYPES.
It returns the first entry that matches the given type. If it can't be found, it returns a nullptr.
const Attribute * LIEF::PE::SignerInfo::get_unauth_attribute | ( | Attribute::TYPE | type | ) | const |
Return the un-authenticated attribute matching the given PE::SIG_ATTRIBUTE_TYPES.
It returns the first entry that matches the given type. If it can't be found, it returns a nullptr.
|
inline |
Return the x509::issuer used by this signer.
SignerInfo & LIEF::PE::SignerInfo::operator= | ( | SignerInfo && | ) |
SignerInfo & LIEF::PE::SignerInfo::operator= | ( | SignerInfo | other | ) |
|
inline |
Raw blob that is signed by the signer certificate.
|
inline |
Return the serial number associated with the x509 certificate used by this signer.
void LIEF::PE::SignerInfo::swap | ( | SignerInfo & | other | ) |
|
inline |
Iterator over LIEF::PE::Attribute for unauthenticated attributes.
|
inline |
Should be 1.