From e2e211455cacc15839da897199699db3a5b59881 Mon Sep 17 00:00:00 2001
From: Konradsop
- * Note: that because we are in a streaming mode only one signer can be tried and it is important
- * that the methods on the parser are called in the appropriate order.
- *
- * A simple example of usage for an encapsulated signature.
- *
- * Two notes: first, in the example below the validity of
- * the certificate isn't verified, just the fact that one of the certs
- * matches the given signer, and, second, because we are in a streaming
- * mode the order of the operations is important.
- *
- * Stream handling note:
- *
- * CmsSignedDataParser sp = new CmsSignedDataParser(encapSigData);
- *
- * sp.GetSignedContent().Drain();
- *
- * IX509Store certs = sp.GetCertificates();
- * SignerInformationStore signers = sp.GetSignerInfos();
- *
- * foreach (SignerInformation signer in signers.GetSigners())
- * {
- * ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
- * X509Certificate cert = (X509Certificate) certList[0];
- *
- * Console.WriteLine("verify returns: " + signer.Verify(cert));
- * }
- *
- * Note also: this class does not introduce buffering - if you are processing large files you should create
- * the parser with:
- *
- * CmsSignedDataParser ep = new CmsSignedDataParser(new BufferedInputStream(encapSigData, bufSize));
- *
- * where bufSize is a suitably large buffer size.
- *
- *
- *
+ /// CmsSignedDataParser sp = new CmsSignedDataParser(sigData);
+ /// sp.GetSignedContent().Drain();
+ /// IStore<X509Certificate> certs = sp.GetCertificates();
+ /// SignerInformationStore signers = sp.GetSignerInfos();
+ /// foreach (SignerInformation signer in signers.GetSigners())
+ /// {
+ /// X509Certificate cert = certs.GetMatches(signer.SignerID).First();
+ /// signer.Verify(cert);
+ /// }
+ ///
+ /// - * The output stream is returned unclosed. - *
- * @param original the signed data stream to be used as a base. - * @param signerInformationStore the new signer information store to use. - * @param out the stream to Write the new signed data object to. - * @return out. - */ + ///- * The output stream is returned unclosed. - *
- * @param original the signed data stream to be used as a base. - * @param certsAndCrls the new certificates and CRLs to be used. - * @param out the stream to Write the new signed data object to. - * @return out. - * @exception CmsException if there is an error processing the CertStore - */ + ///