コード例 #1
0
 public void CheckSignature(X509Certificate2Collection extraStore, bool verifySignatureOnly)
 {
     if (this.m_safeCryptMsgHandle == null || this.m_safeCryptMsgHandle.IsInvalid)
     {
         throw new InvalidOperationException(SecurityResources.GetResourceString("Cryptography_Cms_MessageNotSigned"));
     }
     if (extraStore == null)
     {
         throw new ArgumentNullException("extraStore");
     }
     MySignedCms.CheckSignatures(this.SignerInfos, extraStore, verifySignatureOnly);
 }
コード例 #2
0
 private static void CheckSignatures(SignerInfoCollection signers, X509Certificate2Collection extraStore, bool verifySignatureOnly)
 {
     if (signers == null || signers.Count < 1)
     {
         throw new CryptographicException(-2146885618);
     }
     foreach (SignerInfo signerInfo in signers)
     {
         signerInfo.CheckSignature(extraStore, verifySignatureOnly);
         if (signerInfo.CounterSignerInfos.Count > 0)
         {
             MySignedCms.CheckSignatures(signerInfo.CounterSignerInfos, extraStore, verifySignatureOnly);
         }
     }
 }