Ejemplo n.º 1
0
 public CadesSignatureModel(Lacuna.Pki.Cades.CadesSignature signature, ICadesPolicyMapper policyMapper)
 {
     if (signature.EncapsulatedContentType == CmsContentType.Data)
     {
         EncapsulatedContentType = CmsContentTypes.Data;
     }
     else if (signature.EncapsulatedContentType == CmsContentType.SignedData)
     {
         EncapsulatedContentType = CmsContentTypes.SignedData;
     }
     else if (signature.EncapsulatedContentType == CmsContentType.EnvelopedData)
     {
         EncapsulatedContentType = CmsContentTypes.EnvelopedData;
     }
     else if (signature.EncapsulatedContentType == CmsContentType.DigestedData)
     {
         EncapsulatedContentType = CmsContentTypes.DigestedData;
     }
     else if (signature.EncapsulatedContentType == CmsContentType.EncryptedData)
     {
         EncapsulatedContentType = CmsContentTypes.EncryptedData;
     }
     else if (signature.EncapsulatedContentType == CmsContentType.AuthenticatedData)
     {
         EncapsulatedContentType = CmsContentTypes.AuthenticatedData;
     }
     else if (signature.EncapsulatedContentType == CmsContentType.TstInfo)
     {
         EncapsulatedContentType = CmsContentTypes.TstInfo;
     }
     HasEncapsulatedContent = signature.HasEncapsulatedContent;
     EncapsulatedContent    = signature.GetEncapsulatedContent();
     Signers = signature.Signers.Select(s => new CadesSignerInfoModel(s, policyMapper, signature)).ToList();
 }
 public CadesPolicyMapperWrapper(ICadesPolicyMapper policyMapper, ITrustArbitrator trustArbitrator)
 {
     this.policyMapper    = policyMapper;
     this.trustArbitrator = trustArbitrator;
 }
Ejemplo n.º 3
0
 public ValidationResultsModel(CadesSignerInfo signerInfo, ICadesPolicyMapper policyMapper, Lacuna.Pki.Cades.CadesSignature signature) :
     this(signature.ValidateSignature(signerInfo, policyMapper))
 {
 }
Ejemplo n.º 4
0
 public CadesSignerInfoModel(CadesSignerInfo signerInfo, ICadesPolicyMapper policyMapper, Lacuna.Pki.Cades.CadesSignature signature) : this(signerInfo) {
     ValidationResults = new ValidationResultsModel(signerInfo, policyMapper, signature);
 }