Class X509CertificateInfo
A parsed X.509 certificate (RFC 5280). Read-only. Exposes the fields needed for CMS signing and verification.
Inherited Members
Namespace: DRIT.Mail.Rfc.Crypto.X509
Assembly: DRIT.Mail.dll
Syntax
public sealed class X509CertificateInfo
Constructors
View SourceX509CertificateInfo(int, byte[], AlgorithmIdentifier, X509Name, DateTime, DateTime, X509Name, SubjectPublicKeyInfo, byte[], byte[])
Initializes a new instance of the X509CertificateInfo class.
Declaration
public X509CertificateInfo(int version, byte[] serialNumber, AlgorithmIdentifier signatureAlgorithm, X509Name issuer, DateTime notBefore, DateTime notAfter, X509Name subject, SubjectPublicKeyInfo subjectPublicKeyInfo, byte[] rawData, byte[] tbsRawData)
Parameters
| Type | Name | Description |
|---|---|---|
| int | version | |
| byte[] | serialNumber | |
| AlgorithmIdentifier | signatureAlgorithm | |
| X509Name | issuer | |
| DateTime | notBefore | |
| DateTime | notAfter | |
| X509Name | subject | |
| SubjectPublicKeyInfo | subjectPublicKeyInfo | |
| byte[] | rawData | |
| byte[] | tbsRawData |
Properties
View SourceIsValidNow
Gets a value indicating whether the certificate is currently within its validity period (based on UTC now).
Declaration
public bool IsValidNow { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Issuer
Gets the issuer distinguished name.
Declaration
public X509Name Issuer { get; }
Property Value
| Type | Description |
|---|---|
| X509Name |
NotAfter
Gets the end of the validity period (UTC).
Declaration
public DateTime NotAfter { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
NotBefore
Gets the start of the validity period (UTC).
Declaration
public DateTime NotBefore { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
RawData
Gets the full DER-encoded certificate bytes.
Declaration
public byte[] RawData { get; }
Property Value
| Type | Description |
|---|---|
| byte[] |
SerialNumber
Gets the serial number as big-endian bytes.
Declaration
public byte[] SerialNumber { get; }
Property Value
| Type | Description |
|---|---|
| byte[] |
SignatureAlgorithm
Gets the signature algorithm identifier from the outer Certificate structure.
Declaration
public AlgorithmIdentifier SignatureAlgorithm { get; }
Property Value
| Type | Description |
|---|---|
| AlgorithmIdentifier |
Subject
Gets the subject distinguished name.
Declaration
public X509Name Subject { get; }
Property Value
| Type | Description |
|---|---|
| X509Name |
SubjectPublicKeyInfo
Gets the subject public key info.
Declaration
public SubjectPublicKeyInfo SubjectPublicKeyInfo { get; }
Property Value
| Type | Description |
|---|---|
| SubjectPublicKeyInfo |
TbsRawData
Gets the DER-encoded tbsCertificate bytes (for signature verification).
Declaration
public byte[] TbsRawData { get; }
Property Value
| Type | Description |
|---|---|
| byte[] |
Version
Gets the certificate version (1, 2, or 3).
Declaration
public int Version { get; }
Property Value
| Type | Description |
|---|---|
| int |