Class SslStreamProvider
Provide a secured network stream (SslStream) for a given connected TcpClient.
Inherited Members
Namespace: Tangosol.Net
Assembly: Coherence.dll
Syntax
public class SslStreamProvider : IStreamProvider, IXmlConfigurable
Properties
ClientCertificates
Gets or sets a X509CertificateCollection containing local certificates.
Declaration
public X509CertificateCollection ClientCertificates { get; set; }
Property Value
| Type | Description |
|---|---|
| X509CertificateCollection |
Config
The current configuration of the object.
Declaration
public IXmlElement Config { get; set; }
Property Value
| Type | Description |
|---|---|
| IXmlElement | The XML configuration or |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | When setting, if the object is not in a state that allows the configuration to be set; for example, if the object has already been configured and cannot be reconfigured. |
LocalCertificateSelector
Gets or sets the delegate used to select the local Secure Sockets Layer (SSL) certificate used for authentication.
Declaration
public LocalCertificateSelectionCallback LocalCertificateSelector { get; set; }
Property Value
| Type | Description |
|---|---|
| LocalCertificateSelectionCallback |
Protocols
Gets or sets a value that indicates the security protocol used to authenticate this connection.
Declaration
public SslProtocols Protocols { get; set; }
Property Value
| Type | Description |
|---|---|
| SslProtocols |
RemoteAddress
Address of remote server which the client is connected to.
Declaration
public virtual string RemoteAddress { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RemoteCertificateValidator
Get or sets the delegate used to verify the remote Secure Sockets Layer (SSL) certificate used for authentication.
Declaration
public RemoteCertificateValidationCallback RemoteCertificateValidator { get; set; }
Property Value
| Type | Description |
|---|---|
| RemoteCertificateValidationCallback |
ServerName
Gets or sets the host server specified by the client.
Declaration
public string ServerName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
DefaultCertificateValidation(object, X509Certificate, X509Chain, SslPolicyErrors)
Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication.
Declaration
public static bool DefaultCertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | An object that contains state information for this validation. |
| X509Certificate | certificate | The certificate used to authenticate the remote party. |
| X509Chain | chain | The chain of certificate authorities associated with the remote certificate. |
| SslPolicyErrors | sslPolicyErrors | One or more errors associated with the remote certificate. |
Returns
| Type | Description |
|---|---|
| bool | A Boolean value that determines whether the specified certificate is accepted for authentication. |
GetStream(TcpClient)
Get a secured stream (SSLStream) from an established connection (TcpClient).
Declaration
public Stream GetStream(TcpClient client)
Parameters
| Type | Name | Description |
|---|---|---|
| TcpClient | client | A connected TcpClient, used to establish a secured connection. |
Returns
| Type | Description |
|---|---|
| Stream | A SSLStream connected to the remote host. |
IgnoreCommonNameCertificateValidation(object, X509Certificate, X509Chain, SslPolicyErrors)
Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication. This callback ignores the content of the Common Name for the certificate during the validation.
Declaration
public static bool IgnoreCommonNameCertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | An object that contains state information for this validation. |
| X509Certificate | certificate | The certificate used to authenticate the remote party. |
| X509Chain | chain | The chain of certificate authorities associated with the remote certificate. |
| SslPolicyErrors | sslPolicyErrors | One or more errors associated with the remote certificate. |
Returns
| Type | Description |
|---|---|
| bool | A Boolean value that determines whether the specified certificate is accepted for authentication. |
LocalCertificatePicker(object, string, X509CertificateCollection, X509Certificate, string[])
Selects the local Secure Sockets Layer (SSL) certificate used for authentication.
Declaration
public static X509Certificate LocalCertificatePicker(object sender, string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string[] acceptableIssuers)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | An object that contains state information for this validation. |
| string | targetHost | The host server specified by the client. |
| X509CertificateCollection | localCertificates | An X509CertificateCollection containing local certificates. |
| X509Certificate | remoteCertificate | The certificate used to authenticate the remote party. |
| string[] | acceptableIssuers | A String array of certificate issuers acceptable to the remote party. |
Returns
| Type | Description |
|---|---|
| X509Certificate | An X509Certificate used for establishing an SSL connection. |
StrictCertificateValidation(object, X509Certificate, X509Chain, SslPolicyErrors)
Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication.
Declaration
public static bool StrictCertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | An object that contains state information for this validation. |
| X509Certificate | certificate | The certificate used to authenticate the remote party. |
| X509Chain | chain | The chain of certificate authorities associated with the remote certificate. |
| SslPolicyErrors | sslPolicyErrors | One or more errors associated with the remote certificate. |
Returns
| Type | Description |
|---|---|
| bool | A Boolean value that determines whether the specified certificate is accepted for authentication. |