Class Certificate
Wraps an X.509 certificate used for digitally signing a workbook. Provides a lightweight, workbook-focused view of the underlying X509Certificate2.
Inherited Members
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public sealed class Certificate
Constructors
Certificate(X509Certificate2)
Initializes a new Certificate for the supplied workbook data.
Declaration
public Certificate(X509Certificate2 certificate)
Parameters
| Type | Name | Description |
|---|---|---|
| X509Certificate2 | certificate |
Certificate(string, string)
Initializes a new Certificate for the supplied workbook data.
Declaration
public Certificate(string path, string password = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | |
| string | password |
Properties
Issuer
Exposes the issuer associated with Certificate.
Declaration
public string Issuer { get; }
Property Value
| Type | Description |
|---|---|
| string | The issuer returned by the operation. |
NotAfter
Exposes the not after associated with Certificate.
Declaration
public DateTime? NotAfter { get; }
Property Value
| Type | Description |
|---|---|
| DateTime? | The not after returned by the operation. |
NotBefore
Exposes the not before associated with Certificate.
Declaration
public DateTime? NotBefore { get; }
Property Value
| Type | Description |
|---|---|
| DateTime? | The not before returned by the operation. |
Subject
Exposes the subject associated with Certificate.
Declaration
public string Subject { get; }
Property Value
| Type | Description |
|---|---|
| string | The subject returned by the operation. |
SubjectCommonName
Exposes the subject common name associated with Certificate.
Declaration
public string SubjectCommonName { get; }
Property Value
| Type | Description |
|---|---|
| string | The subject common name returned by the operation. |
Thumbprint
Exposes the thumbprint associated with Certificate.
Declaration
public string Thumbprint { get; }
Property Value
| Type | Description |
|---|---|
| string | The thumbprint returned by the operation. |
Methods
GetRawData()
Retrieves the requested raw data from the Certificate.
Declaration
public byte[] GetRawData()
Returns
| Type | Description |
|---|---|
| byte[] | The get raw data returned by the operation. |
ToX509Certificate2()
Converts the supplied data for use with the Certificate.
Declaration
public X509Certificate2 ToX509Certificate2()
Returns
| Type | Description |
|---|---|
| X509Certificate2 | The to x509 certificate2 returned by the operation. |