public CmsSigner (IEnumerable<X509Certificate> chain, AsymmetricKeyParameter key) : this ()
{
if (chain == null)
throw new ArgumentNullException ("chain");
if (key == null)
throw new ArgumentNullException ("key");
CertificateChain = new X509CertificateChain (chain);
if (CertificateChain.Count == 0)
throw new ArgumentException ("The certificate chain was empty.", "chain");
CheckCertificateCanBeUsedForSigning (CertificateChain[0]);
if (!key.IsPrivate)
throw new ArgumentException ("The key must be a private key.", "key");
Certificate = CertificateChain[0];
PrivateKey = key;
}