LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
LIEF::PE::ContentInfo Class Reference

#include <ContentInfo.hpp>

Inheritance diagram for LIEF::PE::ContentInfo:
Inheritance graph
[legend]
Collaboration diagram for LIEF::PE::ContentInfo:
Collaboration graph
[legend]

Classes

class  Content
 

Public Member Functions

 ContentInfo (const ContentInfo &other)
 
 ContentInfo (ContentInfo &&other)
 
ContentInfooperator= (ContentInfo other)
 
void swap (ContentInfo &other)
 
oid_t content_type () const
 Return the OID that describes the content wrapped by this object. It should match SPC_INDIRECT_DATA_OBJID (1.3.6.1.4.1.311.2.1.4)
 
Contentvalue ()
 
const Contentvalue () const
 
std::vector< uint8_t > digest () const
 Return the digest (authentihash) if the underlying content type is SPC_INDIRECT_DATA_OBJID Otherwise, return an empty vector.
 
ALGORITHMS digest_algorithm () const
 Return the OID algorithm if the underlying content type is SPC_INDIRECT_DATA_OBJID Otherwise, return an empty oid.
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::Object
 Object (const Object &other)
 
Objectoperator= (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
 

Additional Inherited Members

- 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>>>
 

Detailed Description

ContentInfo as described in the RFC2315 (https://tools.ietf.org/html/rfc2315#section-7)

ContentInfo ::= SEQUENCE {
contentType ContentType,
content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL
}
ContentType ::= OBJECT IDENTIFIER

In the case of PE signature, ContentType must be set to SPC_INDIRECT_DATA_OBJID OID: 1.3.6.1.4.1.311.2.1.4 and content is defined by the structure: SpcIndirectDataContent

SpcIndirectDataContent ::= SEQUENCE {
data SpcAttributeTypeAndOptionalValue,
messageDigest DigestInfo
}
SpcAttributeTypeAndOptionalValue ::= SEQUENCE {
type ObjectID,
value [0] EXPLICIT ANY OPTIONAL
}

For PE signature, SpcAttributeTypeAndOptionalValue.type is set to SPC_PE_IMAGE_DATAOBJ (OID: 1.3.6.1.4.1.311.2.1.15) and the value is defined by SpcPeImageData

DigestInfo ::= SEQUENCE {
digestAlgorithm AlgorithmIdentifier,
digest OCTETSTRING
}
AlgorithmIdentifier ::= SEQUENCE {
algorithm ObjectID,
parameters [0] EXPLICIT ANY OPTIONAL
}

Member Function Documentation

◆ accept()

void LIEF::PE::ContentInfo::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.


The documentation for this class was generated from the following file: