예제 #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();
 }
예제 #2
0
 public ValidationResultsModel(CadesSignerInfo signerInfo, ICadesPolicyMapper policyMapper, Lacuna.Pki.Cades.CadesSignature signature) :
     this(signature.ValidateSignature(signerInfo, policyMapper))
 {
 }
예제 #3
0
 public CadesSignerInfoModel(CadesSignerInfo signerInfo, ICadesPolicyMapper policyMapper, Lacuna.Pki.Cades.CadesSignature signature) : this(signerInfo) {
     ValidationResults = new ValidationResultsModel(signerInfo, policyMapper, signature);
 }