Show / Hide Table of Contents
Editar no GitHub

Class PKCertificate

Inheritance
Object
Certificate
PKCertificate
Inherited Members
Certificate.EncodedValue
Certificate.ValidityStart
Certificate.ValidityEnd
Certificate.SignatureValue
Certificate.SerialNumber
Certificate.Extensions
Certificate.SignatureAlgorithm
Certificate.issuer
Certificate.Issuer
Certificate.IssuerFound
Certificate.IssuerNotFound
Certificate.TrustAnchor
Certificate.TbsCertificateEncoded
Certificate.ThumbprintSHA1
Certificate.ThumbprintSHA256
Certificate.AuthorityInformationAccess
Certificate.CAIssuersUri
Certificate.OcspUri
Certificate.IssuerKeyIdentifier
Certificate.Validate(ITrustArbitrator)
Certificate.Validate(CertificateValidationOptions)
Certificate.TryFillIssuer(ICertificateStore)
Certificate.Equals(Object)
Certificate.GetHashCode()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki.dll
Syntax
public class PKCertificate : Certificate

Constructors

| Improve this Doc View Source

PKCertificate(Byte[], Boolean, ICertificateStore)

Declaration
protected PKCertificate(byte[] certContent, bool fillChain, ICertificateStore certStore)
Parameters
Type Name Description
Byte[] certContent
Boolean fillChain
ICertificateStore certStore

Properties

| Improve this Doc View Source

DnsNames

SSL Certificate DNS Names

Declaration
public List<string> DnsNames { get; }
Property Value
Type Description
List<String>
| Improve this Doc View Source

EmailAddress

Declaration
public string EmailAddress { get; }
Property Value
Type Description
String
| Improve this Doc View Source

ExtendedKeyUsage

The subject's extended key usage, or null if the extension is not present.

Declaration
public ExtendedKeyUsage? ExtendedKeyUsage { get; }
Property Value
Type Description
Nullable<ExtendedKeyUsage>
| Improve this Doc View Source

IsCA

Denotes whether this certificate is a Certification Authority certificate, that is, if it may be used to verify certificate signatures, as defined in RFC 5280 item 4.2.1.9.

Declaration
public bool IsCA { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsSelfSigned

Declaration
public override bool IsSelfSigned { get; }
Property Value
Type Description
Boolean
Overrides
Certificate.IsSelfSigned
| Improve this Doc View Source

IssuerDisplayName

Declaration
public override string IssuerDisplayName { get; }
Property Value
Type Description
String
Overrides
Certificate.IssuerDisplayName
| Improve this Doc View Source

IssuerDN

Declaration
protected override Name IssuerDN { get; }
Property Value
Type Description
Name
Overrides
Certificate.IssuerDN
| Improve this Doc View Source

IssuerName

The certificate's issuer name

Declaration
public Name IssuerName { get; protected set; }
Property Value
Type Description
Name
| Improve this Doc View Source

KeyUsage

The subject's key usage, or null if the KeyUsage extension is not present.

Declaration
public KeyUsage? KeyUsage { get; }
Property Value
Type Description
Nullable<KeyUsage>
| Improve this Doc View Source

PkiArgentina

Argentina PKI fields (INFRAESTRUCTURA DE FIRMA DIGITAL – REPÚBLICA ARGENTINA)

Declaration
public ArgentinaCertificateFields PkiArgentina { get; }
Property Value
Type Description
ArgentinaCertificateFields
| Improve this Doc View Source

PkiBrazil

Brazil PKI fields

Declaration
public IcpBrasilCertificateFields PkiBrazil { get; }
Property Value
Type Description
IcpBrasilCertificateFields
| Improve this Doc View Source

PkiEcuador

Ecuador PKI common certificate fields among BCE (Banco Central Del Ecuador) and Security Data entities

Declaration
public EcuadorCertificateFields PkiEcuador { get; }
Property Value
Type Description
EcuadorCertificateFields
| Improve this Doc View Source

PkiItaly

Italy PKI fields

Declaration
public ItalyCertificateFields PkiItaly { get; }
Property Value
Type Description
ItalyCertificateFields
| Improve this Doc View Source

PkiParaguay

Paraguay PKI fields

Declaration
public ParaguayCertificateFields PkiParaguay { get; }
Property Value
Type Description
ParaguayCertificateFields
| Improve this Doc View Source

PkiPeru

Peru PKI fields

Declaration
public PeruCertificateFields PkiPeru { get; }
Property Value
Type Description
PeruCertificateFields
| Improve this Doc View Source

SubjectDisplayName

Declaration
public override string SubjectDisplayName { get; }
Property Value
Type Description
String
Overrides
Certificate.SubjectDisplayName
| Improve this Doc View Source

SubjectKeyIdentifier

Returns the bytes of the SubjectKeyIdentifier extension, or null if the extension is not present.

Declaration
public byte[] SubjectKeyIdentifier { get; }
Property Value
Type Description
Byte[]
| Improve this Doc View Source

SubjectName

The subject's name

Declaration
public Name SubjectName { get; protected set; }
Property Value
Type Description
Name
| Improve this Doc View Source

SubjectPKAlgorithm

The public-key algorithm of the subject's public key

Declaration
public PKAlgorithm SubjectPKAlgorithm { get; protected set; }
Property Value
Type Description
PKAlgorithm
| Improve this Doc View Source

SubjectPublicKey

The subject's public key

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

Methods

| Improve this Doc View Source

Decode(Byte[])

Decodes and creates a certificate object from certificate bytes BER, DER, Base64 or PEM encoded. Without loading the certificate chain.

Declaration
public static PKCertificate Decode(byte[] certContent)
Parameters
Type Name Description
Byte[] certContent

Certificate bytes BER, DER, Base64 or PEM encoded

Returns
Type Description
PKCertificate

PKCertificate object

| Improve this Doc View Source

Decode(Byte[], ICertificateStore)

Decodes and creates a certificate object from certificate bytes BER, DER, Base64 or PEM encoded. With certificate chain loading.

Declaration
public static PKCertificate Decode(byte[] certContent, ICertificateStore certStore)
Parameters
Type Name Description
Byte[] certContent

Certificate bytes BER, DER, Base64 or PEM encoded

ICertificateStore certStore

Certificate store to assist the chain loading

Returns
Type Description
PKCertificate

PKCertificate object

| Improve this Doc View Source

Decode(String)

Decodes and creates a certificate object from certificate Base64 or PEM encoded. Without loading the certificate chain.

Declaration
public static PKCertificate Decode(string certContent)
Parameters
Type Name Description
String certContent

Certificate Base64 or PEM encoded

Returns
Type Description
PKCertificate

PKCertificate object

| Improve this Doc View Source

Decode(String, ICertificateStore)

Decodes and creates a certificate object from certificate Base64 or PEM encoded. With certificate chain loading.

Declaration
public static PKCertificate Decode(string certContent, ICertificateStore certStore)
Parameters
Type Name Description
String certContent

Certificate Base64 or PEM encoded

ICertificateStore certStore

Certificate store to assist the chain loading

Returns
Type Description
PKCertificate

PKCertificate object

| Improve this Doc View Source

DecodeWithoutChainLoading(Byte[])

Decodes and creates a certificate object without chain loading from certificate bytes BER, DER, Base64 or PEM encoded. Without loading the certificate chain.

Declaration
[Obsolete("Use PKCertificate.Decode(certContent) instead")]
public static PKCertificate DecodeWithoutChainLoading(byte[] certContent)
Parameters
Type Name Description
Byte[] certContent

Certificate bytes BER, DER, Base64 or PEM encoded

Returns
Type Description
PKCertificate

PKCertificate object

| Improve this Doc View Source

DecodeWithoutChainLoading(String)

Decodes and creates a certificate object without chain loading from certificate Base64 or PEM encoded. Without loading the certificate chain.

Declaration
[Obsolete("Use PKCertificate.Decode(certContent) instead")]
public static PKCertificate DecodeWithoutChainLoading(string certContent)
Parameters
Type Name Description
String certContent

Certificate Base64 or PEM encoded

Returns
Type Description
PKCertificate

PKCertificate object

| Improve this Doc View Source

GetCertificateChain()

Declaration
public List<PKCertificate> GetCertificateChain()
Returns
Type Description
List<PKCertificate>
| Improve this Doc View Source

GetOrGenerateSubjectKeyIdentifier()

If the certificate contains a Subject Key Identifier extension, returns the value of the key identifier. Otherwise, generates a key identifier using the SHA-1 digest algorithm, as specified in RFC 5280. NOTE: in some cases, one must only reference a certificate by its SubjectKeyIdentifier if the EXTENSION is present. If such cases, use the property SubjectKeyIdentifier instead, that returns a value only if the extension is present.

Declaration
public byte[] GetOrGenerateSubjectKeyIdentifier()
Returns
Type Description
Byte[]
| Improve this Doc View Source

GetSignatureCsp(DigestAlgorithm)

Declaration
public ISignatureCsp GetSignatureCsp(DigestAlgorithm digestAlgorithm)
Parameters
Type Name Description
DigestAlgorithm digestAlgorithm
Returns
Type Description
ISignatureCsp
| Improve this Doc View Source

GetSignatureCsp(SignatureAlgorithm)

Declaration
public ISignatureCsp GetSignatureCsp(SignatureAlgorithm signatureAlgorithm)
Parameters
Type Name Description
SignatureAlgorithm signatureAlgorithm
Returns
Type Description
ISignatureCsp
| Improve this Doc View Source

GetTbsCertificateEncoded()

Declaration
protected override byte[] GetTbsCertificateEncoded()
Returns
Type Description
Byte[]
Overrides
Certificate.GetTbsCertificateEncoded()
| Improve this Doc View Source

IsFinalCA()

Returns whether or not the certificate is a final CA. That is, if the certificate is a CA that can issue end entities certificates only. This method may require certificate chain loading, which can throw exceptions.

Declaration
public bool IsFinalCA()
Returns
Type Description
Boolean

Whether or not the certificate is a final CA

Exceptions
Type Condition
InvalidOperationException

Thrown when the current certificate is not a CA

CertificateIssuerNotFoundException

Thrown when certificate chain loading is required but fails

CertificateChainException

Thrown when the certificate chain does not have a valid path length

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()
Back to top Copyright © 2015-2020 Lacuna Software