private static void InsertTimestampCertChainIntoTimestampCms( SignedCms timestampCms, X509Chain timstampCertChain, NativeCms timestampNativeCms) { timestampNativeCms.AddCertificates(timstampCertChain.ChainElements .Cast <X509ChainElement>() .Where(c => !timestampCms.Certificates.Contains(c.Certificate)) .Select(c => c.Certificate.Export(X509ContentType.Cert))); }
public void AddCertificates(IEnumerable <X509Certificate2> certificates) { _nativeCms.AddCertificates(certificates); }