EndpointIdentity::CreateX509CertificateIdentity Method (X509Certificate2^, X509Certificate2Collection^)
Creates an X509Certificate identity with the specified primary and supporting certificates.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public: static EndpointIdentity^ CreateX509CertificateIdentity( X509Certificate2^ primaryCertificate, X509Certificate2Collection^ supportingCertificates )
Parameters
- primaryCertificate
-
Type:
System.Security.Cryptography.X509Certificates::X509Certificate2^
An X509Certificate2 that contains the primary certificate for the identity.
- supportingCertificates
-
Type:
System.Security.Cryptography.X509Certificates::X509Certificate2Collection^
An X509Certificate2Collection that contains the supporting certificates for the identity.
Return Value
Type: System.ServiceModel::EndpointIdentity^A secure WCF client that connects to an endpoint with this identity verifies that the claims presented by the server contain the claim that contains the thumbprint of the certificate used to construct this identity.
An X509Certificate EndpointIdentity associated with the specified primaryCertificate and supportingCertificates.
| Exception | Condition |
|---|---|
| ArgumentNullException | primaryCertificate or supportingCertificates is null. |
This static method creates an instance of X509CertificateEndpointIdentity by calling its constructor, X509CertificateEndpointIdentity, using primaryCertificate and supportingCertificates as input parameters.
Available since 3.0