SignedCms.AddCertificate(X509Certificate2) Method

Definition

Adds a certificate to the collection of certificates for the encoded CMS/PKCS #7 message.

C#
public void AddCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);

Parameters

certificate
X509Certificate2

The certificate to add to the collection.

Exceptions

The certificate already exists in the collection.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10