Class Certificate
Assembly: Lacuna.Pki.dll
Syntax
public abstract class Certificate
Fields
issuer
Declaration
protected PKCertificate issuer
Field Value
Properties
Declaration
protected AuthorityInformationAccess AuthorityInformationAccess { get; }
Property Value
CAIssuersUri
Declaration
public Uri CAIssuersUri { get; }
Property Value
EncodedValue
Declaration
public byte[] EncodedValue { get; protected set; }
Property Value
Extensions
Declaration
public X509Extensions Extensions { get; protected set; }
Property Value
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
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
IssuerDisplayName
Declaration
public abstract string IssuerDisplayName { get; }
Property Value
IssuerDN
Declaration
protected abstract Name IssuerDN { get; }
Property Value
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
IssuerKeyIdentifier
Declaration
public byte[] IssuerKeyIdentifier { get; }
Property Value
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
OcspUri
Declaration
public Uri OcspUri { get; }
Property Value
SerialNumber
Declaration
public BigInteger SerialNumber { get; protected set; }
Property Value
SignatureAlgorithm
Declaration
public SignatureAlgorithm SignatureAlgorithm { get; protected set; }
Property Value
SignatureValue
Declaration
public byte[] SignatureValue { get; protected set; }
Property Value
SubjectDisplayName
Declaration
public abstract string SubjectDisplayName { get; }
Property Value
TbsCertificateEncoded
Declaration
protected byte[] TbsCertificateEncoded { get; }
Property Value
ThumbprintSHA1
Declaration
public byte[] ThumbprintSHA1 { get; }
Property Value
ThumbprintSHA256
Declaration
public byte[] ThumbprintSHA256 { get; }
Property Value
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
ValidityEnd
Declaration
public DateTimeOffset ValidityEnd { get; protected set; }
Property Value
ValidityStart
Declaration
public DateTimeOffset ValidityStart { get; protected set; }
Property Value
Methods
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
Object |
other |
|
Returns
Overrides
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
Overrides
GetTbsCertificateEncoded()
Declaration
protected abstract byte[] GetTbsCertificateEncoded()
Returns
TryFillIssuer(ICertificateStore)
Declaration
protected void TryFillIssuer(ICertificateStore certStore)
Parameters
Validate(CertificateValidationOptions)
Declaration
public ValidationResults Validate(CertificateValidationOptions validationOptions)
Parameters
Returns
Validate(ITrustArbitrator)
Declaration
public ValidationResults Validate(ITrustArbitrator trustArbitrator)
Parameters
Returns