Pular para o conteúdo principal

XmlPolicySpec

Namespace: Lacuna.Pki.Xml
Assembly: Lacuna.Pki
Class

public class XmlPolicySpec : ITrustArbitrator

Hierarquia: object → XmlPolicySpec

Construtores​

XmlPolicySpec()​

public XmlPolicySpec()

Propriedades​

ArchiveTimestampPolicy​

public CadesPolicySpec ArchiveTimestampPolicy { get; set; }

Retorno

CadesPolicySpec


DigestAlgorithms​

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

Retorno

List<DigestAlgorithm>


Generation​

public XmlPolicySpec.GenerationSpec Generation { get; set; }

Retorno

XmlPolicySpec.GenerationSpec


PolicyId​

Optionally specifies the policy's OID and other identifying properties.

public XmlPolicyIdentifier PolicyId { get; set; }

Retorno

XmlPolicyIdentifier


SigAndRefsTimestampPolicy​

public CadesPolicySpec SigAndRefsTimestampPolicy { get; set; }

Retorno

CadesPolicySpec


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?


Validation​

public XmlPolicySpec.ValidationSpec Validation { get; set; }

Retorno

XmlPolicySpec.ValidationSpec


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()

ClearTrustArbitrators(bool)​

Clear the trust arbitrators in this policy spec

public void ClearTrustArbitrators(bool propagateToTimestampPolicies = false)

Parâmetros

NomeTipoDescrição
propagateToTimestampPoliciesbool

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


GetXadesBasic(ITrustArbitrator, bool)​

public static XmlPolicySpec GetXadesBasic(ITrustArbitrator arbitrator, bool includeSigningTime = false)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator
includeSigningTimebool

Retorno

XmlPolicySpec


GetXmlDSigBasic(ITrustArbitrator, DigestAlgorithm)​

Returns the XmlDSig basic signature policy using the given digest algorithm for digest computation and also for signing (RSA is implied).

public static XmlPolicySpec GetXmlDSigBasic(ITrustArbitrator arbitrator, DigestAlgorithm preferredDigestAlgorithm)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator
preferredDigestAlgorithmDigestAlgorithm

Retorno

XmlPolicySpec


GetXmlDSigBasic(ITrustArbitrator)​

public static XmlPolicySpec GetXmlDSigBasic(ITrustArbitrator arbitrator)

Parâmetros

NomeTipoDescrição
arbitratorITrustArbitrator

Retorno

XmlPolicySpec


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.


SetFailureLevel(ValidationItemTypes, ValidationFailureLevels)​

public void SetFailureLevel(ValidationItemTypes failureType, ValidationFailureLevels level)

Parâmetros

NomeTipoDescrição
failureTypeValidationItemTypes
levelValidationFailureLevels

Membros herdados​

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

View as Markdown