共用方式為


Pkcs12SafeContents.AddCertificate(X509Certificate2) 方法

定義

透過新的 Pkcs12CertBag 將憑證新增至 SafeContents,並傳回新建立的包執行個體。

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

參數

certificate
X509Certificate2

要加入的憑證。

傳回

已新增至 SafeContents 的包執行個體。

例外狀況

certificate 參數為 null

此執行個體是唯讀項目。

certificate 參數處於無效狀態。

適用於

另請參閱