HttpsConnectionFactory

Overview

Location

 

constructor    (declared in SslConnectionFactory)

Creates a new instance for this class.

 

constructor

 

HttpsConnectionFactory()

 

Sub New()

constructor (HttpProxySettings)

 

constructor(proxySettings: HttpProxySettings)

 

HttpsConnectionFactory(HttpProxySettings proxySettings)

 

Sub New(proxySettings As HttpProxySettings)

Parameters:

  • proxySettings:

Certificate    (declared in SslConnectionFactory)

This certificate contains the public AND private key to use for this TLS connection. When used for clients, it will contain the key to use for client authentication to the server, which is usually optional. For servers, this property is not required.

 

property Certificate: X509Certificate2 read write;

 

X509Certificate2 Certificate { get; set; }

 

Property Certificate() As X509Certificate2

CertificateFileName    (declared in SslConnectionFactory)

Use this property instead of Certificate to load the certificate from a file (in the pkcs12 format).

 

property CertificateFileName: String read write;

 

String CertificateFileName { get; set; }

 

Property CertificateFileName() As String

CertificateStore    (declared in SslConnectionFactory)

 

property CertificateStore: String read write;

 

String CertificateStore { get; set; }

 

Property CertificateStore() As String

CertificateSubject    (declared in SslConnectionFactory)

 

property CertificateSubject: String read write;

 

String CertificateSubject { get; set; }

 

Property CertificateSubject() As String

CertificateThumbprint    (declared in SslConnectionFactory)

 

property CertificateThumbprint: String read write;

 

String CertificateThumbprint { get; set; }

 

Property CertificateThumbprint() As String

CopyProperties    (declared in SslConnectionFactory)

 

method CopyProperties(source: SslConnectionFactory)

 

void CopyProperties(SslConnectionFactory source)

 

Sub CopyProperties(source As SslConnectionFactory)

Parameters:

  • source:

CreateClientConnection (Binding): Connection

 

method CreateClientConnection(binding: Binding): Connection

 

Connection CreateClientConnection(Binding binding)

 

Function CreateClientConnection(binding As Binding) As Connection

Parameters:

  • binding:

CreateClientConnection (Connection): Connection

 

method CreateClientConnection(connection: Connection): Connection

 

Connection CreateClientConnection(Connection connection)

 

Function CreateClientConnection(connection As Connection) As Connection

Parameters:

  • connection:

CreateServerConnection    (declared in SslConnectionFactory)

This method is used internally to create a new Connection with a given binding with the SSL layer enabled.

 

method CreateServerConnection(socket: Socket): Connection

 

Connection CreateServerConnection(Socket socket)

 

Function CreateServerConnection(socket As Socket) As Connection

Parameters:

  • socket:

Enabled    (declared in SslConnectionFactory)

Enables or disables the use of the TLS connection filter. Defaults to Enabled = true.

 

property Enabled: Boolean read write;

 

Boolean Enabled { get; set; }

 

Property Enabled() As Boolean

IsCertificateLoadPending    (declared in SslConnectionFactory)

 

property IsCertificateLoadPending: Boolean read;

 

Boolean IsCertificateLoadPending { get; }

 

ReadOnly Property IsCertificateLoadPending() As Boolean

LoadCertificate    (declared in SslConnectionFactory)

 

method LoadCertificate

 

void LoadCertificate()

 

Sub LoadCertificate()

NeedPassword    (declared in SslConnectionFactory)

The NeedPassword event is triggered when the certificate is being loaded and is protected by a password.

 

event NeedPassword: EventHandler<SslNeedPasswordEventArgs>;

 

delegate EventHandler<SslNeedPasswordEventArgs> NeedPassword()

 

Event NeedPassword As EventHandler<SslNeedPasswordEventArgs>

OnNeedPassword    (declared in SslConnectionFactory)

 

method OnNeedPassword(e: SslNeedPasswordEventArgs)

 

void OnNeedPassword(SslNeedPasswordEventArgs e)

 

Sub OnNeedPassword(e As SslNeedPasswordEventArgs)

Parameters:

  • e:

OnValidateRemoteCertificate    (declared in SslConnectionFactory)

 

method OnValidateRemoteCertificate(certificate: X509Certificate; chain: X509Chain; sslPolicyErrors: SslPolicyErrors; isServer: Boolean): Boolean

 

Boolean OnValidateRemoteCertificate(X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors, Boolean isServer)

 

Function OnValidateRemoteCertificate(certificate As X509Certificate, chain As X509Chain, sslPolicyErrors As SslPolicyErrors, isServer As Boolean) As Boolean

Parameters:

  • certificate:
  • chain:
  • sslPolicyErrors:
  • isServer:

ProxySettings

 

property ProxySettings: HttpProxySettings read;

 

HttpProxySettings ProxySettings { get; }

 

ReadOnly Property ProxySettings() As HttpProxySettings

RequestClientCertificate    (declared in SslConnectionFactory)

 

property RequestClientCertificate: Boolean read write;

 

Boolean RequestClientCertificate { get; set; }

 

Property RequestClientCertificate() As Boolean

TargetHostName    (declared in SslConnectionFactory)

Specifies the expected target host name when connecting to a server. When this does not match the server, it will fail to finish the connection handshake.

 

property TargetHostName: String read write;

 

String TargetHostName { get; set; }

 

Property TargetHostName() As String

TargetPort

 

property TargetPort: Int32 read write;

 

Int32 TargetPort { get; set; }

 

Property TargetPort() As Int32

UseMono    (declared in SslConnectionFactory)

Forces the use of the Mono.Security.dll library over the default .NET 2.0 SslStream. The Mono.Security.dll version works on both Mono and .NET and has better support for the different certificate types.

 

property UseMono: Boolean read write;

 

Boolean UseMono { get; set; }

 

Property UseMono() As Boolean

UseTls    (declared in SslConnectionFactory)

 

property UseTls: Boolean read write;

 

Boolean UseTls { get; set; }

 

Property UseTls() As Boolean

ValidateRemoteCertificate    (declared in SslConnectionFactory)

Assign this event to override the default certificate validation. When assigned and returning true, the remote certificate will be accepted. Returning false makes it fail to setup a connection. When this is not set, it will use the default certificate store to validate certificates.

 

event ValidateRemoteCertificate: EventHandler<SslValidateCertificateEventArgs>;

 

delegate EventHandler<SslValidateCertificateEventArgs> ValidateRemoteCertificate()

 

Event ValidateRemoteCertificate As EventHandler<SslValidateCertificateEventArgs>

 

Certificate    (declared in SslConnectionFactory)

This certificate contains the public AND private key to use for this TLS connection. When used for clients, it will contain the key to use for client authentication to the server, which is usually optional. For servers, this property is not required.

 

property Certificate: X509Certificate2 read write;

 

X509Certificate2 Certificate { get; set; }

 

Property Certificate() As X509Certificate2

CertificateFileName    (declared in SslConnectionFactory)

Use this property instead of Certificate to load the certificate from a file (in the pkcs12 format).

 

property CertificateFileName: String read write;

 

String CertificateFileName { get; set; }

 

Property CertificateFileName() As String

CertificateStore    (declared in SslConnectionFactory)

 

property CertificateStore: String read write;

 

String CertificateStore { get; set; }

 

Property CertificateStore() As String

CertificateSubject    (declared in SslConnectionFactory)

 

property CertificateSubject: String read write;

 

String CertificateSubject { get; set; }

 

Property CertificateSubject() As String

CertificateThumbprint    (declared in SslConnectionFactory)

 

property CertificateThumbprint: String read write;

 

String CertificateThumbprint { get; set; }

 

Property CertificateThumbprint() As String

Enabled    (declared in SslConnectionFactory)

Enables or disables the use of the TLS connection filter. Defaults to Enabled = true.

 

property Enabled: Boolean read write;

 

Boolean Enabled { get; set; }

 

Property Enabled() As Boolean

IsCertificateLoadPending    (declared in SslConnectionFactory)

 

property IsCertificateLoadPending: Boolean read;

 

Boolean IsCertificateLoadPending { get; }

 

ReadOnly Property IsCertificateLoadPending() As Boolean

ProxySettings

 

property ProxySettings: HttpProxySettings read;

 

HttpProxySettings ProxySettings { get; }

 

ReadOnly Property ProxySettings() As HttpProxySettings

RequestClientCertificate    (declared in SslConnectionFactory)

 

property RequestClientCertificate: Boolean read write;

 

Boolean RequestClientCertificate { get; set; }

 

Property RequestClientCertificate() As Boolean

TargetHostName    (declared in SslConnectionFactory)

Specifies the expected target host name when connecting to a server. When this does not match the server, it will fail to finish the connection handshake.

 

property TargetHostName: String read write;

 

String TargetHostName { get; set; }

 

Property TargetHostName() As String

TargetPort

 

property TargetPort: Int32 read write;

 

Int32 TargetPort { get; set; }

 

Property TargetPort() As Int32

UseMono    (declared in SslConnectionFactory)

Forces the use of the Mono.Security.dll library over the default .NET 2.0 SslStream. The Mono.Security.dll version works on both Mono and .NET and has better support for the different certificate types.

 

property UseMono: Boolean read write;

 

Boolean UseMono { get; set; }

 

Property UseMono() As Boolean

UseTls    (declared in SslConnectionFactory)

 

property UseTls: Boolean read write;

 

Boolean UseTls { get; set; }

 

Property UseTls() As Boolean

 

constructor    (declared in SslConnectionFactory)

Creates a new instance for this class.

 

constructor

 

HttpsConnectionFactory()

 

Sub New()

constructor (HttpProxySettings)

 

constructor(proxySettings: HttpProxySettings)

 

HttpsConnectionFactory(HttpProxySettings proxySettings)

 

Sub New(proxySettings As HttpProxySettings)

Parameters:

  • proxySettings:

CopyProperties    (declared in SslConnectionFactory)

 

method CopyProperties(source: SslConnectionFactory)

 

void CopyProperties(SslConnectionFactory source)

 

Sub CopyProperties(source As SslConnectionFactory)

Parameters:

  • source:

CreateClientConnection (Binding): Connection

 

method CreateClientConnection(binding: Binding): Connection

 

Connection CreateClientConnection(Binding binding)

 

Function CreateClientConnection(binding As Binding) As Connection

Parameters:

  • binding:

CreateClientConnection (Connection): Connection

 

method CreateClientConnection(connection: Connection): Connection

 

Connection CreateClientConnection(Connection connection)

 

Function CreateClientConnection(connection As Connection) As Connection

Parameters:

  • connection:

CreateServerConnection    (declared in SslConnectionFactory)

This method is used internally to create a new Connection with a given binding with the SSL layer enabled.

 

method CreateServerConnection(socket: Socket): Connection

 

Connection CreateServerConnection(Socket socket)

 

Function CreateServerConnection(socket As Socket) As Connection

Parameters:

  • socket:

LoadCertificate    (declared in SslConnectionFactory)

 

method LoadCertificate

 

void LoadCertificate()

 

Sub LoadCertificate()

OnNeedPassword    (declared in SslConnectionFactory)

 

method OnNeedPassword(e: SslNeedPasswordEventArgs)

 

void OnNeedPassword(SslNeedPasswordEventArgs e)

 

Sub OnNeedPassword(e As SslNeedPasswordEventArgs)

Parameters:

  • e:

OnValidateRemoteCertificate    (declared in SslConnectionFactory)

 

method OnValidateRemoteCertificate(certificate: X509Certificate; chain: X509Chain; sslPolicyErrors: SslPolicyErrors; isServer: Boolean): Boolean

 

Boolean OnValidateRemoteCertificate(X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors, Boolean isServer)

 

Function OnValidateRemoteCertificate(certificate As X509Certificate, chain As X509Chain, sslPolicyErrors As SslPolicyErrors, isServer As Boolean) As Boolean

Parameters:

  • certificate:
  • chain:
  • sslPolicyErrors:
  • isServer:

 

NeedPassword    (declared in SslConnectionFactory)

The NeedPassword event is triggered when the certificate is being loaded and is protected by a password.

 

event NeedPassword: EventHandler<SslNeedPasswordEventArgs>;

 

delegate EventHandler<SslNeedPasswordEventArgs> NeedPassword()

 

Event NeedPassword As EventHandler<SslNeedPasswordEventArgs>

ValidateRemoteCertificate    (declared in SslConnectionFactory)

Assign this event to override the default certificate validation. When assigned and returning true, the remote certificate will be accepted. Returning false makes it fail to setup a connection. When this is not set, it will use the default certificate store to validate certificates.

 

event ValidateRemoteCertificate: EventHandler<SslValidateCertificateEventArgs>;

 

delegate EventHandler<SslValidateCertificateEventArgs> ValidateRemoteCertificate()

 

Event ValidateRemoteCertificate As EventHandler<SslValidateCertificateEventArgs>