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
Propriedades
AuthorityInformationAccess
protected AuthorityInformationAccess AuthorityInformationAccess { get; }
Retorno
CAIssuersUri
public Uri CAIssuersUri { get; }
Retorno
EncodedValue
public byte[] EncodedValue { get; protected set; }
Retorno
Extensions
public X509Extensions Extensions { get; protected set; }
Retorno
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
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
IssuerDisplayName
public abstract string IssuerDisplayName { get; }
Retorno
IssuerDN
protected abstract Name IssuerDN { get; }
Retorno
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
IssuerKeyIdentifier
public byte[] IssuerKeyIdentifier { get; }
Retorno
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
OcspUri
public Uri OcspUri { get; }
Retorno
SerialNumber
public BigInteger SerialNumber { get; protected set; }
Retorno
SignatureAlgorithm
public SignatureAlgorithm SignatureAlgorithm { get; protected set; }
Retorno
SignatureValue
public byte[] SignatureValue { get; protected set; }
Retorno
SubjectDisplayName
public abstract string SubjectDisplayName { get; }
Retorno
TbsCertificateEncoded
protected byte[] TbsCertificateEncoded { get; }
Retorno
ThumbprintSHA1
public byte[] ThumbprintSHA1 { get; }
Retorno
ThumbprintSHA256
public byte[] ThumbprintSHA256 { get; }
Retorno
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
ValidityEnd
public DateTimeOffset ValidityEnd { get; protected set; }
Retorno
ValidityStart
public DateTimeOffset ValidityStart { get; protected set; }
Retorno
Métodos
Equals(object)
public override bool Equals(object other)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
other | object |
Retorno
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
GetTbsCertificateEncoded()
protected abstract byte[] GetTbsCertificateEncoded()
Retorno
TryFillIssuer(ICertificateStore)
protected void TryFillIssuer(ICertificateStore certStore)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
certStore | ICertificateStore |
Validate(CertificateValidationOptions)
public ValidationResults Validate(CertificateValidationOptions validationOptions)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
validationOptions | CertificateValidationOptions |
Retorno
Validate(ITrustArbitrator)
public ValidationResults Validate(ITrustArbitrator trustArbitrator)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
trustArbitrator | ITrustArbitrator |
Retorno
Membros herdados
ToString(), Equals(object, object), ReferenceEquals(object, object), GetType(), MemberwiseClone()