Represents a method that is called when the .NET Framework needs to determine which certificate to use for authentication.
public delegate X509Certificate DefaultCertificateDelegate(object sender, String targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, String[] acceptableIssuers);
sender: The object that originated the certificate validation callback.targetHost: The host name of the server that is requesting the client authentication.localCertificates: A collection of certificates sent by the server.remoteCertificate: The certificate used by the server to authenticate the client.acceptableIssuers: An array of Distinguished Names for the CAs that the server recognizes.
An X509Certificate that represents the certificate to be used for authentication. Can be null to indicate that no certificate should be used.
The DefaultCertificateDelegate delegate is used by the AuthenticationContext class to specify a callback method that handles the selection of an X509Certificate for client authentication.
When a client application connects to a server that requires client authentication, the .NET Framework invokes the method pointed to by this delegate. The delegate method receives information about the server and the available certificates and is responsible for returning an appropriate client certificate to be used for authentication.
| Requirement | Details |
|---|---|
| Namespace | System.Net.Security |
| Assembly | System.Net.dll |
| Platform | Windows, Linux, macOS |