Pkcs12SafeContents.AddCertificate(X509Certificate2) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a certificate to the SafeContents via a new Pkcs12CertBag and returns the newly created bag instance.
public:
System::Security::Cryptography::Pkcs::Pkcs12CertBag ^ AddCertificate(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public System.Security.Cryptography.Pkcs.Pkcs12CertBag AddCertificate (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
member this.AddCertificate : System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.Security.Cryptography.Pkcs.Pkcs12CertBag
Public Function AddCertificate (certificate As X509Certificate2) As Pkcs12CertBag
Parameters
- certificate
- X509Certificate2
The certificate to add.
Returns
The bag instance which was added to the SafeContents.
Exceptions
The certificate
parameter is null
.
This instance is read-only.
The certificate
parameter is in an invalid state.
Applies to
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.