Export (0) Print
Expand All

LocalCertificateSelectionCallback Delegate

Selects the local Secure Sockets Layer (SSL) certificate used for authentication.

Namespace:  System.Net.Security
Assembly:  System (in System.dll)

type LocalCertificateSelectionCallback = 
    delegate of  
        sender:Object * 
        targetHost:string * 
        localCertificates:X509CertificateCollection * 
        remoteCertificate:X509Certificate * 
        acceptableIssuers:string[] -> X509Certificate

Parameters

sender
Type: System.Object

An object that contains state information for this validation.

targetHost
Type: System.String

The host server specified by the client.

localCertificates
Type: System.Security.Cryptography.X509Certificates.X509CertificateCollection

An X509CertificateCollection containing local certificates.

remoteCertificate
Type: System.Security.Cryptography.X509Certificates.X509Certificate

The certificate used to authenticate the remote party.

acceptableIssuers
Type: System.String[]

A String array of certificate issuers acceptable to the remote party.

Return Value

Type: System.Security.Cryptography.X509Certificates.X509Certificate
An X509Certificate used for establishing an SSL connection.

This delegate is used to construct instances of the SslStream class. The SslStream class is used to help secure information exchanged between a client and server. The client and server use this delegate to select a certificate to be used for authentication.

The following code example demonstrates a method implementation for this delegate.

No code example is currently available or this language may not be supported.

The following code example demonstrates creating an instance of this delegate.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft