X509CertificateEndpointIdentity 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 X509CertificateEndpointIdentity 類別的新執行個體。
多載
X509CertificateEndpointIdentity(X509Certificate2) |
使用現有的憑證, X509CertificateEndpointIdentity 初始化 類別的新實例。 |
X509CertificateEndpointIdentity(X509Certificate2, X509Certificate2Collection) |
使用主要 (分葉) 憑證以及屬於其信賴鏈結之一部分的憑證,初始化 X509CertificateEndpointIdentity 類別的新執行個體。 |
備註
您可以根據是否需要 supportingCertificates
,來選擇建構函式。
X509CertificateEndpointIdentity(X509Certificate2)
使用現有的憑證, X509CertificateEndpointIdentity 初始化 類別的新實例。
public:
X509CertificateEndpointIdentity(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public X509CertificateEndpointIdentity (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
new System.ServiceModel.X509CertificateEndpointIdentity : System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.ServiceModel.X509CertificateEndpointIdentity
Public Sub New (certificate As X509Certificate2)
參數
- certificate
- X509Certificate2
要複製 (Clone) 的憑證。
例外狀況
certificate
為 null
。
備註
certificate
會加入至憑證的集合。
適用於
X509CertificateEndpointIdentity(X509Certificate2, X509Certificate2Collection)
使用主要 (分葉) 憑證以及屬於其信賴鏈結之一部分的憑證,初始化 X509CertificateEndpointIdentity 類別的新執行個體。
public:
X509CertificateEndpointIdentity(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ primaryCertificate, System::Security::Cryptography::X509Certificates::X509Certificate2Collection ^ supportingCertificates);
public X509CertificateEndpointIdentity (System.Security.Cryptography.X509Certificates.X509Certificate2 primaryCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection supportingCertificates);
new System.ServiceModel.X509CertificateEndpointIdentity : System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.X509Certificates.X509Certificate2Collection -> System.ServiceModel.X509CertificateEndpointIdentity
Public Sub New (primaryCertificate As X509Certificate2, supportingCertificates As X509Certificate2Collection)
參數
- primaryCertificate
- X509Certificate2
表示服務身分識別的主要憑證。
- supportingCertificates
- X509Certificate2Collection
屬於主要憑證信賴鏈結之一部分的憑證。
例外狀況
primaryCertificate
或 supportingCertificates
為 null
。
備註
primaryCertificate
和 supportingCertificates
會加入至憑證的集合。