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
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
Revision
Gets the revision of the file format that is used for this certificate.
public abstract CertificateRevision Revision { get; }
Property Value
Type
Gets the type of the certificate.
public abstract CertificateType Type { get; }
Property Value
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
BinaryStreamWriterThe 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
BinaryStreamWriterThe output stream.