Pular para o conteúdo principal

Certificate

Namespace: Lacuna.Pki
Assembly: Lacuna.Pki
Class

public abstract class Certificate

Hierarquia: object → Certificate

Construtores​

Certificate()​

protected Certificate()

Campos​

issuer​

protected PKCertificate issuer

Retorno

PKCertificate


Propriedades​

AuthorityInformationAccess​

protected AuthorityInformationAccess AuthorityInformationAccess { get; }

Retorno

AuthorityInformationAccess


CAIssuersUri​

public Uri CAIssuersUri { get; }

Retorno

Uri


EncodedValue​

public byte[] EncodedValue { get; protected set; }

Retorno

byte[]


Extensions​

public X509Extensions Extensions { get; protected set; }

Retorno

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.

public abstract bool IsSelfSigned { get; }

Retorno

bool


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.

public PKCertificate Issuer { get; }

Retorno

PKCertificate


IssuerDisplayName​

public abstract string IssuerDisplayName { get; }

Retorno

string


IssuerDN​

protected abstract Name IssuerDN { get; }

Retorno

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.

public bool IssuerFound { get; }

Retorno

bool


IssuerKeyIdentifier​

public byte[] IssuerKeyIdentifier { get; }

Retorno

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.

public bool IssuerNotFound { get; }

Retorno

bool


OcspUri​

public Uri OcspUri { get; }

Retorno

Uri


SerialNumber​

public BigInteger SerialNumber { get; protected set; }

Retorno

BigInteger


SignatureAlgorithm​

public SignatureAlgorithm SignatureAlgorithm { get; protected set; }

Retorno

SignatureAlgorithm


SignatureValue​

public byte[] SignatureValue { get; protected set; }

Retorno

byte[]


SubjectDisplayName​

public abstract string SubjectDisplayName { get; }

Retorno

string


TbsCertificateEncoded​

protected byte[] TbsCertificateEncoded { get; }

Retorno

byte[]


ThumbprintSHA1​

public byte[] ThumbprintSHA1 { get; }

Retorno

byte[]


ThumbprintSHA256​

public byte[] ThumbprintSHA256 { get; }

Retorno

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.

public PKCertificate TrustAnchor { get; }

Retorno

PKCertificate


ValidityEnd​

public DateTimeOffset ValidityEnd { get; protected set; }

Retorno

DateTimeOffset


ValidityStart​

public DateTimeOffset ValidityStart { get; protected set; }

Retorno

DateTimeOffset


Métodos​

Equals(object)​

public override bool Equals(object other)

Parâmetros

NomeTipoDescrição
otherobject

Retorno

bool


GetCertificateChain()​

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

public List<Certificate> GetCertificateChain()

Retorno

List<Certificate> — The complete certificate chain, starting with this certificate and ending on the root certificate.


GetHashCode()​

public override int GetHashCode()

Retorno

int


GetTbsCertificateEncoded()​

protected abstract byte[] GetTbsCertificateEncoded()

Retorno

byte[]


TryFillIssuer(ICertificateStore)​

protected void TryFillIssuer(ICertificateStore certStore)

Parâmetros

NomeTipoDescrição
certStoreICertificateStore

Validate(CertificateValidationOptions)​

public ValidationResults Validate(CertificateValidationOptions validationOptions)

Parâmetros

NomeTipoDescrição
validationOptionsCertificateValidationOptions

Retorno

ValidationResults


Validate(ITrustArbitrator)​

public ValidationResults Validate(ITrustArbitrator trustArbitrator)

Parâmetros

NomeTipoDescrição
trustArbitratorITrustArbitrator

Retorno

ValidationResults


Membros herdados​

ToString(), Equals(object, object), ReferenceEquals(object, object), GetType(), MemberwiseClone()

View as Markdown