Table of Contents

Class AttributeCertificate

Namespace
AsmResolver.PE.Certificates
Assembly
AsmResolver.PE.dll

When derived from this class, represents a single certificate in the attribute certificate data directory of a signed portable executable file.

public abstract class AttributeCertificate : SegmentBase, ISegment, IOffsetProvider, IWritable
Inheritance
AttributeCertificate
Implements
Derived
Inherited Members

Fields

HeaderSize

Defines the size of a single header of a certificate.

public const uint HeaderSize = 8

Field Value

uint

Properties

CanRead

Gets a value indicating whether the raw contents of the signature can be read using a BinaryStreamReader instance.

public abstract bool CanRead { get; }

Property Value

bool

Revision

Gets the revision of the file format that is used for this certificate.

public abstract CertificateRevision Revision { get; }

Property Value

CertificateRevision

Type

Gets the type of the certificate.

public abstract CertificateType Type { get; }

Property Value

CertificateType

Methods

CreateContentReader()

Creates a binary reader that reads the raw contents of the stored signature.

public abstract BinaryStreamReader CreateContentReader()

Returns

BinaryStreamReader

The reader.

GetContentsSize()

Gets the total size in bytes of the certificate contents itself, excluding the header.

protected abstract uint GetContentsSize()

Returns

uint

The number of bytes.

GetPhysicalSize()

Computes the number of bytes that the structure contains.

public override uint GetPhysicalSize()

Returns

uint

The number of bytes.

Write(BinaryStreamWriter)

Serializes the structure to an output stream.

public override void Write(BinaryStreamWriter writer)

Parameters

writer BinaryStreamWriter

The output stream to write the data to.

WriteContents(BinaryStreamWriter)

Writes the contents of the certificate to the provided output stream.

protected abstract void WriteContents(BinaryStreamWriter writer)

Parameters

writer BinaryStreamWriter

The output stream.