Show / Hide Table of Contents

Class Certificate

Inheritance
Object
Certificate
AttributeCertificate
PKCertificate
Inherited Members
Object.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki.dll
Syntax
public abstract class Certificate

Fields

issuer

Declaration
protected PKCertificate issuer
Field Value
Type Description
PKCertificate

Properties

AuthorityInformationAccess

Declaration
protected AuthorityInformationAccess AuthorityInformationAccess { get; }
Property Value
Type Description
AuthorityInformationAccess

CAIssuersUri

Declaration
public Uri CAIssuersUri { get; }
Property Value
Type Description
Uri

EncodedValue

Declaration
public byte[] EncodedValue { get; protected set; }
Property Value
Type Description
Byte[]

Extensions

Declaration
public X509Extensions Extensions { get; protected set; }
Property Value
Type Description
X509Extensions

IsSelfSigned

Denotes whether this is a self-signed certificate (root certificate) or not.

NOTICE: never test the condition Issuer==null to assertain if a certificate is self-signed, since that condition may throw an exception in case the certificate is not a self-signed certificate but its issuer could not be located. For such purposes, use this property instead.

Declaration
public abstract bool IsSelfSigned { get; }
Property Value
Type Description
Boolean

Issuer

The certificate's issuer public key certificate, or null if the certificate is self-signed. If the certificate is not self signed but the issuer cannot be found, this property throws a CertificateIssuerNotFoundException. In order to check if the issuer was found, use the property IssuerFound before calling this property.

NOTICE: never test the condition Issuer==null to assertain if a PKCertificate is self-signed. For such purposes, use the property IsSelfSigned instead.

Declaration
public PKCertificate Issuer { get; }
Property Value
Type Description
PKCertificate

IssuerDisplayName

Declaration
public abstract string IssuerDisplayName { get; }
Property Value
Type Description
String

IssuerDN

Declaration
protected abstract Name IssuerDN { get; }
Property Value
Type Description
Name

IssuerFound

Denotes whether the certificate's issuer was found. Returns false for self-signed certificates.

NOTICE: this property is not exactly a negation of the IssuerNotFound property, since both properties return false for self-signed certificates.

Declaration
public bool IssuerFound { get; }
Property Value
Type Description
Boolean

IssuerKeyIdentifier

Declaration
public byte[] IssuerKeyIdentifier { get; }
Property Value
Type Description
Byte[]

IssuerNotFound

Denothes whether the certificate's issuer was not found. Returns false for self-signed certificates.

NOTICE: this property is not exactly a negation of the IssuerFound property, since both properties return false for self-signed certificates.

Declaration
public bool IssuerNotFound { get; }
Property Value
Type Description
Boolean

OcspUri

Declaration
public Uri OcspUri { get; }
Property Value
Type Description
Uri

SerialNumber

Declaration
public BigInteger SerialNumber { get; protected set; }
Property Value
Type Description
BigInteger

SignatureAlgorithm

Declaration
public SignatureAlgorithm SignatureAlgorithm { get; protected set; }
Property Value
Type Description
SignatureAlgorithm

SignatureValue

Declaration
public byte[] SignatureValue { get; protected set; }
Property Value
Type Description
Byte[]

SubjectDisplayName

Declaration
public abstract string SubjectDisplayName { get; }
Property Value
Type Description
String

TbsCertificateEncoded

Declaration
protected byte[] TbsCertificateEncoded { get; }
Property Value
Type Description
Byte[]

ThumbprintSHA1

Declaration
public byte[] ThumbprintSHA1 { get; }
Property Value
Type Description
Byte[]

ThumbprintSHA256

Declaration
public byte[] ThumbprintSHA256 { get; }
Property Value
Type Description
Byte[]

TrustAnchor

Returns the trust anchor for this certificate, that is, the root certificate at the top of the certification chain. Throws a CertificateIssuerNotFoundException if the certification chain cannot be determined all the way to a root certificate.

Declaration
public PKCertificate TrustAnchor { get; }
Property Value
Type Description
PKCertificate

ValidityEnd

Declaration
public DateTimeOffset ValidityEnd { get; protected set; }
Property Value
Type Description
DateTimeOffset

ValidityStart

Declaration
public DateTimeOffset ValidityStart { get; protected set; }
Property Value
Type Description
DateTimeOffset

Methods

Equals(Object)

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
Object other
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)

GetCertificateChain()

Returns the certificate chain from this certificate up to the root certificate

Declaration
public List<Certificate> GetCertificateChain()
Returns
Type Description
List<Certificate>

The complete certificate chain, starting with this certificate and ending on the root certificate.

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()

GetTbsCertificateEncoded()

Declaration
protected abstract byte[] GetTbsCertificateEncoded()
Returns
Type Description
Byte[]

TryFillIssuer(ICertificateStore)

Declaration
protected void TryFillIssuer(ICertificateStore certStore)
Parameters
Type Name Description
ICertificateStore certStore

Validate(CertificateValidationOptions)

Declaration
public ValidationResults Validate(CertificateValidationOptions validationOptions)
Parameters
Type Name Description
CertificateValidationOptions validationOptions
Returns
Type Description
ValidationResults

Validate(ITrustArbitrator)

Declaration
public ValidationResults Validate(ITrustArbitrator trustArbitrator)
Parameters
Type Name Description
ITrustArbitrator trustArbitrator
Returns
Type Description
ValidationResults
Back to top Copyright © 2015-2020 Lacuna Software