Pular para o conteúdo principal

TrustedRoots

Namespace: Lacuna.Pki
Assembly: Lacuna.Pki
Class

public class TrustedRoots : ITrustArbitrator

Hierarquia: objectTrustedRoots

Construtores

TrustedRoots()

public TrustedRoots()

TrustedRoots(IEnumerable<PKCertificate>, IEnumerable<PKCertificate>)

public TrustedRoots(IEnumerable<PKCertificate> trustedRoots, IEnumerable<PKCertificate> intermediateCAs)

Parâmetros

NomeTipoDescrição
trustedRootsIEnumerable<PKCertificate>
intermediateCAsIEnumerable<PKCertificate>

TrustedRoots(IEnumerable<PKCertificate>)

public TrustedRoots(IEnumerable<PKCertificate> trustedRoots)

Parâmetros

NomeTipoDescrição
trustedRootsIEnumerable<PKCertificate>

TrustedRoots(params PKCertificate[])

public TrustedRoots(params PKCertificate[] trustedRoots)

Parâmetros

NomeTipoDescrição
trustedRootsPKCertificate[]

Métodos

Add(PKCertificate)

public void Add(PKCertificate trustedRoot)

Parâmetros

NomeTipoDescrição
trustedRootPKCertificate

AddIntermediateCAs(IEnumerable<PKCertificate>)

public void AddIntermediateCAs(IEnumerable<PKCertificate> intermediateCAs)

Parâmetros

NomeTipoDescrição
intermediateCAsIEnumerable<PKCertificate>

AddRange(IEnumerable<PKCertificate>)

public void AddRange(IEnumerable<PKCertificate> trustedRoots)

Parâmetros

NomeTipoDescrição
trustedRootsIEnumerable<PKCertificate>

GetCertificateStore()

Returns a certificate store based on the arbitrator root certificates

public ICertificateStore GetCertificateStore()

Retorno

ICertificateStore — Certificate store based on the arbitrator root certificates. Can be null.

Comentários

If that method does not make sense for your implementation or there is no certificate in your arbitrator logic, it can return null.


IsRootTrusted(PKCertificate, DateTimeOffset?, out ValidationResults)

Determines whether a given PKCertificate is trusted, optionally outputting a ValidationResults object that represents validations done while asserting the trust status.

public bool IsRootTrusted(PKCertificate root, DateTimeOffset? dateReference, out ValidationResults vr)

Parâmetros

NomeTipoDescrição
rootPKCertificateThe certificate for which the trust status must be determined.
dateReferenceDateTimeOffset?An optional date reference on which the trust is to be asserted. If null, validation is done considering the present moment (now).
vrValidationResultsThe retults of the validations necessary to assertain the trust status. Implementors of this interface should set this parameter to null if no validations where required.

Retorno

bool — Whether the given certificate is to be trusted or not.


Membros herdados

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