Pular para o conteúdo principal

CadesPolicySpec

Namespace: Lacuna.Pki.Cades
Assembly: Lacuna.Pki
Class

Class for setting Cades signature policy specifications

public class CadesPolicySpec : ITrustArbitrator

Hierarquia: objectCadesPolicySpec

Construtores

CadesPolicySpec()

public CadesPolicySpec()

Propriedades

AttributeGeneration

public CadesPolicySpec.AttributeGenerationSpec AttributeGeneration { get; set; }

Retorno

CadesPolicySpec.AttributeGenerationSpec


AttributeValidation

public CadesPolicySpec.AttributeValidationSpec AttributeValidation { get; set; }

Retorno

CadesPolicySpec.AttributeValidationSpec


CadesCTimestampPolicy

public CadesPolicySpec CadesCTimestampPolicy { get; set; }

Retorno

CadesPolicySpec


CurrentArchiveTimestampPolicy

public CadesPolicySpec CurrentArchiveTimestampPolicy { get; set; }

Retorno

CadesPolicySpec


DigestAlgorithms

public List<DigestAlgorithm> DigestAlgorithms { get; set; }

Retorno

List<DigestAlgorithm>


ForceSigningCertificateV1

public bool ForceSigningCertificateV1 { get; set; }

Retorno

bool


GracePeriodCatalog

public IGracePeriodCatalog GracePeriodCatalog { get; set; }

Retorno

IGracePeriodCatalog


PolicyDigest

public DigestAlgorithmAndValue PolicyDigest { get; set; }

Retorno

DigestAlgorithmAndValue


PolicyOid

public string PolicyOid { get; set; }

Retorno

string


PolicyUri

public Uri PolicyUri { get; set; }

Retorno

Uri


PreviousArchiveTimestampPolicy

public CadesPolicySpec PreviousArchiveTimestampPolicy { get; set; }

Retorno

CadesPolicySpec


RevocationDate

public DateTimeOffset RevocationDate { get; set; }

Retorno

DateTimeOffset


SignatureAlgorithms

public List<SignatureAlgorithm> SignatureAlgorithms { get; set; }

Retorno

List<SignatureAlgorithm>


SignatureTimestampPolicy

public CadesPolicySpec SignatureTimestampPolicy { get; set; }

Retorno

CadesPolicySpec


SigningPeriodEnd

public DateTimeOffset SigningPeriodEnd { get; set; }

Retorno

DateTimeOffset


SigningPeriodStart

public DateTimeOffset SigningPeriodStart { get; set; }

Retorno

DateTimeOffset


Métodos

AddTrustArbitrator(ITrustArbitrator, bool)

Add a trust root arbitrator to the policy spec. The policy spec needs at least one arbitrator added.

public void AddTrustArbitrator(ITrustArbitrator arbitrator, bool propagateToTimestampPolicies = false)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator
propagateToTimestampPoliciesbool

AddTrustArbitrator(params ITrustArbitrator[])

Add a trust root arbitrator to the policy spec. The policy spec needs at least one arbitrator added.

public void AddTrustArbitrator(params ITrustArbitrator[] arbitrators)

Parâmetros

NomeTipoDescrição
arbitratorsITrustArbitrator[]

CheckIntegrity()

public void CheckIntegrity()

ClearTrustArbitrator(bool)

Clear the trust arbitrators in this policy spec

public void ClearTrustArbitrator(bool propagateToTimestampPolicies = false)

Parâmetros

NomeTipoDescrição
propagateToTimestampPoliciesbool

GetCadesA(ITrustArbitrator)

public static CadesPolicySpec GetCadesA(ITrustArbitrator arbitrator = null)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator

Retorno

CadesPolicySpec


GetCadesBes(ITrustArbitrator)

public static CadesPolicySpec GetCadesBes(ITrustArbitrator arbitrator = null)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator

Retorno

CadesPolicySpec


GetCadesC(ITrustArbitrator)

public static CadesPolicySpec GetCadesC(ITrustArbitrator arbitrator = null)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator

Retorno

CadesPolicySpec


GetCadesT(ITrustArbitrator)

public static CadesPolicySpec GetCadesT(ITrustArbitrator arbitrator = null)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator

Retorno

CadesPolicySpec


GetCadesXLong(ITrustArbitrator)

public static CadesPolicySpec GetCadesXLong(ITrustArbitrator arbitrator = null)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator

Retorno

CadesPolicySpec


GetCadesXLongType1(ITrustArbitrator)

public static CadesPolicySpec GetCadesXLongType1(ITrustArbitrator arbitrator = null)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator

Retorno

CadesPolicySpec


GetCadesXType1(ITrustArbitrator)

public static CadesPolicySpec GetCadesXType1(ITrustArbitrator arbitrator = null)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator

Retorno

CadesPolicySpec


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.


GetFailureLevel(ValidationItemTypes)

public ValidationFailureLevels GetFailureLevel(ValidationItemTypes failureType)

Parâmetros

NomeTipoDescrição
failureTypeValidationItemTypes

Retorno

ValidationFailureLevels


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 virtual 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.


SetFailureLevel(ValidationItemTypes, ValidationFailureLevels)

public void SetFailureLevel(ValidationItemTypes failureType, ValidationFailureLevels level)

Parâmetros

NomeTipoDescrição
failureTypeValidationItemTypes
levelValidationFailureLevels

SetGracePeriod(TimeSpan)

The time period that permits the certificate revocation information to propagate through the revocation process to relying parties

public void SetGracePeriod(TimeSpan gracePeriod)

Parâmetros

NomeTipoDescrição
gracePeriodTimeSpanGrace period timespan

Comentários

A grace period permits certificate revocation information to propagate through the revocation processes. This period could extend from the time an authorized entity requests certificate revocation to when the information is available for the relying party to use. In order to make sure that the certificate was not revoked at the time the signature was time-marked or time-stamped, verifiers should wait until the end of the grace period.


Membros herdados

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