Share via


AuthenticationProviderX509 Constructor

Definition

Creates an instance of this class.

public AuthenticationProviderX509 (System.Security.Cryptography.X509Certificates.X509Certificate2 clientCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificateChain = default);
new Microsoft.Azure.Devices.Provisioning.Client.AuthenticationProviderX509 : System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.X509Certificates.X509Certificate2Collection -> Microsoft.Azure.Devices.Provisioning.Client.AuthenticationProviderX509
Public Sub New (clientCertificate As X509Certificate2, Optional certificateChain As X509Certificate2Collection = Nothing)

Parameters

clientCertificate
X509Certificate2

The client certificate used for authentication. The private key should be available in the X509Certificate2 object, or should be available in the certificate store of the system where the client will be authenticated from.

certificateChain
X509Certificate2Collection

The certificate chain leading to the root certificate uploaded to the device provisioning service.

Remarks

Ensure that you dispose any supplied X509Certificate2 after you are done using it to ensure there are no memory leaks.

Applies to