Rexec Component

Properties   Methods   Events   Config Settings   Errors  

The remote exec (rexec) component is used to execute commands on a remote UNIX machine using the rexec mechanism.

Syntax

nsoftware.IPWorks.Rexec

Remarks

The rexec component allows remote execution of commands on UNIX hosts, or any other system with the rexec interface. Using the component is simple. The destination is specified by the RemoteHost property, and the login information is given by the RemoteUser and RemotePassword properties. You can call the Execute method with the Command to execute as a parameter. You also can set the Command property to the command that you would like to execute for identical results. Further input can be supplied to the command by assigning data to the Text parameter of the Send method or by using the Stdin property.

The output of the command is returned through the Stdout event. If an error happens on the protocol level, the error message can be found in the ErrorMessage property. Errors that occur during command execution (the stderr stream) are given by the Stderr event.

Note: To be able to successfully use the component, the remote host must be set up to allow for execution of commands via rexec from the machine the component runs on.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

BytesSentThis property includes the number of bytes actually sent after an assignment to Stdin.
Command*This property is deprecated. Please use the SendCommand method instead.
ConnectedThis shows whether the component is connected.
EOFIf this property is True, the connection has closed, and no buffered data are available.
EOLThis property is used to break the stdout data stream into chunks separated by its value.
ErrEOLThis property is used to break the stderr data stream into chunks separated by its value.
ErrorMessageThis property includes the error message that is returned when any of the steps before command execution fail.
FirewallA set of properties related to firewall access.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
LocalPortThis property includes the Transmission Control Protocol (TCP) port in the local host where the component binds.
RemoteHostThis property includes the address of the remote host. Domain names are resolved to IP addresses.
RemotePasswordThis property includes the password of the user on the remote host.
RemotePortThis property includes the remote exec (rexec) service port (default is 512).
RemoteUserThis property includes the Id of the user on the remote host.
StderrThis property returns the standard error (stderr) output from the remote application.
Stdin*This property is deprecated. Please use the SendStdinBytes method or the SendStdinText method instead.
StdoutThis property provides the standard output (stdout) from the remote application.
TimeoutA timeout for the component.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
ConnectThis method connects to the remote host without performing any action.
DisconnectThis method disconnects from the RemoteHost .
DoEventsProcesses events from the internal message queue.
ExecuteThis method executes a Command on the remote host.
InterruptInterrupt the current method.
ResetThis method resets the component.
SendThis method sends standard input to the program executing on the remote host.
SendCommandThis method sends the specified command to the server.
SendStdinBytesThis method sends binary data to the remote host.
SendStdinTextThis method sends text to the remote host.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

ConnectedThis event is fired immediately after a connection completes (or fails).
ConnectionStatusThis event is fired to indicate changes in the connection state.
DisconnectedThis event is fired when a connection is closed.
ErrorInformation about errors during data delivery.
StderrThis event is fired when data (complete lines) come in through stderr.
StdoutThis event is fired when data (complete lines) come in through stdout.

Config Settings


The following is a list of config settings for the component with short descriptions. Click on the links for further details.

EnableStderrEnables or disables secondary (stderr) stream.
MaxStderrMaximum storage available for the stderr buffer.
MaxStdoutMaximum storage available for the stdout buffer.
StderrPortThe local port from which the remote system sends the stderr stream.
CloseStreamAfterTransferIf true, the component will close the upload or download stream after the transfer.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallListenerIf true, the component binds to a SOCKS firewall as a server (TCPClient only).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the component binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
TcpNoDelayWhether or not to delay when sending packets.
UseIPv6Whether to use IPv6.
UseNTLMv2Whether to use NTLM V2.
CACertFilePathsThe paths to CA certificate files when using Mono on Unix/Linux.
LogSSLPacketsControls whether SSL packets are logged when using the internal security API.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCACertsA newline separated list of CA certificate to use during SSL client authentication.
SSLCheckCRLWhether to check the Certificate Revocation List for the server certificate.
SSLCheckOCSPWhether to use OCSP to check the status of the server certificate.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledCipherSuitesThe cipher suite to be used in an SSL negotiation.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLEnableRenegotiationWhether the renegotiation_info SSL extension is supported.
SSLIncludeCertChainWhether the entire certificate chain is included in the SSLServerAuthentication event.
SSLKeyLogFileThe location of a file where per-session secrets are written for debugging purposes.
SSLNegotiatedCipherReturns the negotiated cipher suite.
SSLNegotiatedCipherStrengthReturns the negotiated cipher suite strength.
SSLNegotiatedCipherSuiteReturns the negotiated cipher suite.
SSLNegotiatedKeyExchangeReturns the negotiated key exchange algorithm.
SSLNegotiatedKeyExchangeStrengthReturns the negotiated key exchange algorithm strength.
SSLNegotiatedVersionReturns the negotiated protocol version.
SSLSecurityFlagsFlags that control certificate verification.
SSLServerCACertsA newline separated list of CA certificate to use during SSL server certificate validation.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when SSLProvider is set to Internal.
TLS12SupportedGroupsThe supported groups for ECC.
TLS13KeyShareGroupsThe groups for which to pregenerate key shares.
TLS13SignatureAlgorithmsThe allowed certificate signature algorithms.
TLS13SupportedGroupsThe supported groups for (EC)DHE key exchange.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
BuildInfoInformation about the product's build.
GUIAvailableTells the component whether or not a message loop is available for processing events.
LicenseInfoInformation about the current license.
MaskSensitiveWhether sensitive data is masked in log messages.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

BytesSent Property (Rexec Component)

This property includes the number of bytes actually sent after an assignment to Stdin.

Syntax

public int BytesSent { get; }
Public ReadOnly Property BytesSent As Integer

Default Value

0

Remarks

The BytesSent property shows how many bytes were sent after the last assignment to Stdin. Please check the Stdin property for more information.

This property is read-only and not available at design time.

Command Property (Rexec Component)

This property includes the command to be sent to the remote host.

Syntax

public string Command { get; set; }
Public Property Command As String

Default Value

""

Remarks

Assigning a UNIX command to this property makes the component attempt to connect to the RemoteHost and execute the command using the rexec protocol. It is not necessary to append an end-of-line character to the command.

If "" (empty string) is assigned to the Command property, the current connection is broken.

Example. Execute a Command:

RexecControl.Command = "cd /home/username/; ls -al; cd/; ls"

Connected Property (Rexec Component)

This shows whether the component is connected.

Syntax

public bool Connected { get; set; }
Public Property Connected As Boolean

Default Value

False

Remarks

This property is used to determine whether or not the component is connected to the remote host.

Note: It is recommended to use the Connect or Disconnect method instead of setting this property.

This property is not available at design time.

EOF Property (Rexec Component)

If this property is True, the connection has closed, and no buffered data are available.

Syntax

public bool EOF { get; }
Public ReadOnly Property EOF As Boolean

Default Value

True

Remarks

EOF is an acronym for "end of file".

This property is read-only.

EOL Property (Rexec Component)

This property is used to break the stdout data stream into chunks separated by its value.

Syntax

public string EOL { get; set; }
public byte[] EOLB { get; set; }
Public Property EOL As String
Public Property EOLB As Byte()

Default Value

"ASCII code 10 (newline)"

Remarks

The EOL property is used to define boundaries in the Stdout stream using the value of the property.

This property is not available at design time.

ErrEOL Property (Rexec Component)

This property is used to break the stderr data stream into chunks separated by its value.

Syntax

public string ErrEOL { get; set; }
public byte[] ErrEOLB { get; set; }
Public Property ErrEOL As String
Public Property ErrEOLB As Byte()

Default Value

"ASCII code 10 (newline)"

Remarks

The ErrEOL property is used to define boundaries in the Stderr stream using the value of the property.

This property is not available at design time.

ErrorMessage Property (Rexec Component)

This property includes the error message that is returned when any of the steps before command execution fail.

Syntax

public string ErrorMessage { get; }
Public ReadOnly Property ErrorMessage As String

Default Value

""

Remarks

This error message is returned on a separate connection associated with error messages.

This property is read-only.

Firewall Property (Rexec Component)

A set of properties related to firewall access.

Syntax

public Firewall Firewall { get; set; }
Public Property Firewall As Firewall

Remarks

This is a Firewall type property which contains fields describing the firewall through which the component will attempt to connect.

Please refer to the Firewall type for a complete list of fields.

LocalHost Property (Rexec Component)

The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

Syntax

public string LocalHost { get; set; }
Public Property LocalHost As String

Default Value

""

Remarks

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the component initiate connections (or accept in the case of server components) only through that interface.

If the component is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.

LocalPort Property (Rexec Component)

This property includes the Transmission Control Protocol (TCP) port in the local host where the component binds.

Syntax

public int LocalPort { get; set; }
Public Property LocalPort As Integer

Default Value

0

Remarks

The LocalPort property must be set before a connection is attempted. This property instructs the component to bind to a specific port (or communication endpoint) in the local machine.

Setting it to zero (the default) enables the component to choose a port at random. The chosen port will be shown by the LocalPort property after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set the LocalPort property when a connection is active will generate an error.

Note: Use this property with caution. If you supply a value, it must be an available port on the system, or an error will be returned. Furthermore, the component always attempts to bind to a secure (sub 1000) port when the value of LocalPort is the default (zero). If you supply your own value, ensure that the remote system is configured to allow that particular value.

This property is not available at design time.

RemoteHost Property (Rexec Component)

This property includes the address of the remote host. Domain names are resolved to IP addresses.

Syntax

public string RemoteHost { get; set; }
Public Property RemoteHost As String

Default Value

""

Remarks

This property specifies the IP address (IP number in dotted internet format) or the domain name of the remote host. It is set before a connection is attempted and cannot be changed once a connection is established.

If this property is set to a domain name, a DNS request is initiated, and upon successful termination of the request, this property is set to the corresponding address. If the search is not successful, an error is returned.

If the component is configured to use a SOCKS firewall, the value assigned to this property may be preceded with an "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.

Example. Connecting:

TCPClientControl.RemoteHost = "MyHostNameOrIP" TCPClientControl.RemotePort = 777 TCPClientControl.Connected = true

RemotePassword Property (Rexec Component)

This property includes the password of the user on the remote host.

Syntax

public string RemotePassword { get; set; }
Public Property RemotePassword As String

Default Value

""

Remarks

This must be the password of a user in the remote host for whom remote execution of commands is permitted.

RemotePort Property (Rexec Component)

This property includes the remote exec (rexec) service port (default is 512).

Syntax

public int RemotePort { get; set; }
Public Property RemotePort As Integer

Default Value

512

Remarks

The RemotePort property specifies the rexec service port on the remote host.

A valid port number (a value between 1 and 65535) is required for the connection to take place. This property must be set before command execution is attempted.

This property is not available at design time.

RemoteUser Property (Rexec Component)

This property includes the Id of the user on the remote host.

Syntax

public string RemoteUser { get; set; }
Public Property RemoteUser As String

Default Value

""

Remarks

This must be the Id of a user in the remote host for whom remote execution of commands is permitted.

Stderr Property (Rexec Component)

This property returns the standard error (stderr) output from the remote application.

Syntax

public string Stderr { get; }
public byte[] StderrB { get; }
Public ReadOnly Property Stderr As String
Public ReadOnly Property StderrB As Byte()

Default Value

""

Remarks

This property is set to an empty string before each new request.

This property is read-only and not available at design time.

Stdin Property (Rexec Component)

This property includes a string of data to be sent to the remote host while connected.

Syntax

public string Stdin { set; }
public byte[] StdinB { set; }
Public WriteOnly Property Stdin As String
Public WriteOnly Property StdinB As Byte()

Default Value

""

Remarks

This property is used to provide input for the process in the remote host.

If you are sending data to the remote host faster than it can process it, or faster than the network bandwidth allows, the outgoing queue might fill up. When this happens, Stdin fails with exception 10035: "[10035] Operation would block" (WSAEWOULDBLOCK). You can check this error, and then try to send the data again. .

This property is write-only and not available at design time.

Stdout Property (Rexec Component)

This property provides the standard output (stdout) from the remote application.

Syntax

public string Stdout { get; }
public byte[] StdoutB { get; }
Public ReadOnly Property Stdout As String
Public ReadOnly Property StdoutB As Byte()

Default Value

""

Remarks

The property is set to an empty string before each new request.

This property is read-only and not available at design time.

Timeout Property (Rexec Component)

A timeout for the component.

Syntax

public int Timeout { get; set; }
Public Property Timeout As Integer

Default Value

60

Remarks

If the Timeout property is set to 0, all operations return immediately, potentially failing with a WOULDBLOCK error if data cannot be sent immediately.

If Timeout is set to a positive value, data is sent in a blocking manner and the component will wait for the operation to complete before returning control. The component will handle any potential WOULDBLOCK errors internally and automatically retry the operation for a maximum of Timeout seconds.

The component will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the component throws an exception.

Please note that by default, all timeouts are inactivity timeouts, i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.

The default value for the Timeout property is 60 seconds.

Config Method (Rexec Component)

Sets or retrieves a configuration setting.

Syntax

public string Config(string configurationString);

Async Version
public async Task<string> Config(string configurationString);
public async Task<string> Config(string configurationString, CancellationToken cancellationToken);
Public Function Config(ByVal ConfigurationString As String) As String

Async Version
Public Function Config(ByVal ConfigurationString As String) As Task(Of String)
Public Function Config(ByVal ConfigurationString As String, cancellationToken As CancellationToken) As Task(Of String)

Remarks

Config is a generic method available in every component. It is used to set and retrieve configuration settings for the component.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

Connect Method (Rexec Component)

This method connects to the remote host without performing any action.

Syntax

public void Connect();

Async Version
public async Task Connect();
public async Task Connect(CancellationToken cancellationToken);
Public Sub Connect()

Async Version
Public Sub Connect() As Task
Public Sub Connect(cancellationToken As CancellationToken) As Task

Remarks

This method establishes a connection with the remote host specified by URL, but it does not send a request. In most cases, it is recommended to use the appropriate method, such as Get or Post, which will both establish a connection and send a request.

This method may be useful in cases in which it is desirable to establish a connection without performing any operation (e.g., when testing connectivity).

Disconnect Method (Rexec Component)

This method disconnects from the RemoteHost .

Syntax

public void Disconnect();

Async Version
public async Task Disconnect();
public async Task Disconnect(CancellationToken cancellationToken);
Public Sub Disconnect()

Async Version
Public Sub Disconnect() As Task
Public Sub Disconnect(cancellationToken As CancellationToken) As Task

Remarks

It normally is not necessary to call this method unless you wish to interrupt the remote program or the remote program is waiting for standard input to end before terminating.

DoEvents Method (Rexec Component)

Processes events from the internal message queue.

Syntax

public void DoEvents();

Async Version
public async Task DoEvents();
public async Task DoEvents(CancellationToken cancellationToken);
Public Sub DoEvents()

Async Version
Public Sub DoEvents() As Task
Public Sub DoEvents(cancellationToken As CancellationToken) As Task

Remarks

When DoEvents is called, the component processes any available events. If no events are available, it waits for a preset period of time, and then returns.

Execute Method (Rexec Component)

This method executes a Command on the remote host.

Syntax

public void Execute(string command);

Async Version
public async Task Execute(string command);
public async Task Execute(string command, CancellationToken cancellationToken);
Public Sub Execute(ByVal Command As String)

Async Version
Public Sub Execute(ByVal Command As String) As Task
Public Sub Execute(ByVal Command As String, cancellationToken As CancellationToken) As Task

Remarks

Calling this method is equivalent to setting the Command property to Command.

Example. Execute a Command:

RexecControl.Execute("cd /home/username/; ls -al; cd/; ls")

Interrupt Method (Rexec Component)

Interrupt the current method.

Syntax

public void Interrupt();

Async Version
public async Task Interrupt();
public async Task Interrupt(CancellationToken cancellationToken);
Public Sub Interrupt()

Async Version
Public Sub Interrupt() As Task
Public Sub Interrupt(cancellationToken As CancellationToken) As Task

Remarks

If there is no method in progress, Interrupt simply returns, doing nothing.

Reset Method (Rexec Component)

This method resets the component.

Syntax

public void Reset();

Async Version
public async Task Reset();
public async Task Reset(CancellationToken cancellationToken);
Public Sub Reset()

Async Version
Public Sub Reset() As Task
Public Sub Reset(cancellationToken As CancellationToken) As Task

Remarks

This method will reset the component's properties to their default values.

Send Method (Rexec Component)

This method sends standard input to the program executing on the remote host.

Syntax

public void Send(byte[] text);

Async Version
public async Task Send(byte[] text);
public async Task Send(byte[] text, CancellationToken cancellationToken);
Public Sub Send(ByVal Text As String)

Async Version
Public Sub Send(ByVal Text As String) As Task
Public Sub Send(ByVal Text As String, cancellationToken As CancellationToken) As Task

Remarks

Calling this method is equivalent to setting the Stdin property to Text.

SendCommand Method (Rexec Component)

This method sends the specified command to the server.

Syntax

public void SendCommand(string command);

Async Version
public async Task SendCommand(string command);
public async Task SendCommand(string command, CancellationToken cancellationToken);
Public Sub SendCommand(ByVal Command As String)

Async Version
Public Sub SendCommand(ByVal Command As String) As Task
Public Sub SendCommand(ByVal Command As String, cancellationToken As CancellationToken) As Task

Remarks

This method sends the Command to the RemoteHost. There is no need to append an end-of-line character to the command.

SendStdinBytes Method (Rexec Component)

This method sends binary data to the remote host.

Syntax

public void SendStdinBytes(byte[] data);

Async Version
public async Task SendStdinBytes(byte[] data);
public async Task SendStdinBytes(byte[] data, CancellationToken cancellationToken);
Public Sub SendStdinBytes(ByVal Data As String)

Async Version
Public Sub SendStdinBytes(ByVal Data As String) As Task
Public Sub SendStdinBytes(ByVal Data As String, cancellationToken As CancellationToken) As Task

Remarks

This method sends the specified binary data to the remote host. The data provided are used as input for the process on the remote host. To send text, use the SendStdinText method instead.

If you are sending data to the remote host faster than it can process it, or faster than the network bandwidth allows, the outgoing queue might fill up. When this happens the component fails with exception 10035: "[10035] Operation would block" (WSAEWOULDBLOCK). You can check this error, and then try to send the data again. .

SendStdinText Method (Rexec Component)

This method sends text to the remote host.

Syntax

public void SendStdinText(string text);

Async Version
public async Task SendStdinText(string text);
public async Task SendStdinText(string text, CancellationToken cancellationToken);
Public Sub SendStdinText(ByVal Text As String)

Async Version
Public Sub SendStdinText(ByVal Text As String) As Task
Public Sub SendStdinText(ByVal Text As String, cancellationToken As CancellationToken) As Task

Remarks

This method sends the specified text to the remote host. The text provided is used as an input for the process on the remote host. To send binary data, use the SendStdinBytes method instead.

If you are sending data to the remote host faster than it can process it, or faster than the network bandwidth allows, the outgoing queue might fill up. When this happens the component fails with exception 10035: "[10035] Operation would block" (WSAEWOULDBLOCK). You can check this error, and then try to send the data again. .

Connected Event (Rexec Component)

This event is fired immediately after a connection completes (or fails).

Syntax

public event OnConnectedHandler OnConnected;

public delegate void OnConnectedHandler(object sender, RexecConnectedEventArgs e);

public class RexecConnectedEventArgs : EventArgs {
  public int StatusCode { get; }
  public string Description { get; }
}
Public Event OnConnected As OnConnectedHandler

Public Delegate Sub OnConnectedHandler(sender As Object, e As RexecConnectedEventArgs)

Public Class RexecConnectedEventArgs Inherits EventArgs
  Public ReadOnly Property StatusCode As Integer
  Public ReadOnly Property Description As String
End Class

Remarks

If the connection is made normally, StatusCode is 0 and Description is "OK".

If the connection fails, StatusCode has the error code returned by the Transmission Control Protocol (TCP)/IP stack. Description contains a description of this code. The value of StatusCode is equal to the value of the error.

Please refer to the Error Codes section for more information.

ConnectionStatus Event (Rexec Component)

This event is fired to indicate changes in the connection state.

Syntax

public event OnConnectionStatusHandler OnConnectionStatus;

public delegate void OnConnectionStatusHandler(object sender, RexecConnectionStatusEventArgs e);

public class RexecConnectionStatusEventArgs : EventArgs {
  public string ConnectionEvent { get; }
  public int StatusCode { get; }
  public string Description { get; }
}
Public Event OnConnectionStatus As OnConnectionStatusHandler

Public Delegate Sub OnConnectionStatusHandler(sender As Object, e As RexecConnectionStatusEventArgs)

Public Class RexecConnectionStatusEventArgs Inherits EventArgs
  Public ReadOnly Property ConnectionEvent As String
  Public ReadOnly Property StatusCode As Integer
  Public ReadOnly Property Description As String
End Class

Remarks

The ConnectionStatus event is fired when the connection state changes: for example, completion of a firewall or proxy connection or completion of a security handshake.

The ConnectionEvent parameter indicates the type of connection event. Values may include the following:

Firewall connection complete.
Secure Sockets Layer (SSL) or S/Shell handshake complete (where applicable).
Remote host connection complete.
Remote host disconnected.
SSL or S/Shell connection broken.
Firewall host disconnected.
StatusCode has the error code returned by the Transmission Control Protocol (TCP)/IP stack. Description contains a description of this code. The value of StatusCode is equal to the value of the error.

Disconnected Event (Rexec Component)

This event is fired when a connection is closed.

Syntax

public event OnDisconnectedHandler OnDisconnected;

public delegate void OnDisconnectedHandler(object sender, RexecDisconnectedEventArgs e);

public class RexecDisconnectedEventArgs : EventArgs {
  public int StatusCode { get; }
  public string Description { get; }
}
Public Event OnDisconnected As OnDisconnectedHandler

Public Delegate Sub OnDisconnectedHandler(sender As Object, e As RexecDisconnectedEventArgs)

Public Class RexecDisconnectedEventArgs Inherits EventArgs
  Public ReadOnly Property StatusCode As Integer
  Public ReadOnly Property Description As String
End Class

Remarks

If the connection is broken normally, StatusCode is 0 and Description is "OK".

If the connection is broken for any other reason, StatusCode has the error code returned by the Transmission Control Protocol (TCP/IP) subsystem. Description contains a description of this code. The value of StatusCode is equal to the value of the TCP/IP error.

Please refer to the Error Codes section for more information.

Error Event (Rexec Component)

Information about errors during data delivery.

Syntax

public event OnErrorHandler OnError;

public delegate void OnErrorHandler(object sender, RexecErrorEventArgs e);

public class RexecErrorEventArgs : EventArgs {
  public int ErrorCode { get; }
  public string Description { get; }
}
Public Event OnError As OnErrorHandler

Public Delegate Sub OnErrorHandler(sender As Object, e As RexecErrorEventArgs)

Public Class RexecErrorEventArgs Inherits EventArgs
  Public ReadOnly Property ErrorCode As Integer
  Public ReadOnly Property Description As String
End Class

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally the component throws an exception.

ErrorCode contains an error code and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

Stderr Event (Rexec Component)

This event is fired when data (complete lines) come in through stderr.

Syntax

public event OnStderrHandler OnStderr;

public delegate void OnStderrHandler(object sender, RexecStderrEventArgs e);

public class RexecStderrEventArgs : EventArgs {
  public string Text { get; }
public byte[] TextB { get; } public bool EOL { get; } }
Public Event OnStderr As OnStderrHandler

Public Delegate Sub OnStderrHandler(sender As Object, e As RexecStderrEventArgs)

Public Class RexecStderrEventArgs Inherits EventArgs
  Public ReadOnly Property Text As String
Public ReadOnly Property TextB As Byte() Public ReadOnly Property EOL As Boolean End Class

Remarks

The Stderr event is fired every time the process on the remote host outputs a line in its error output. The incoming data are provided through the Text parameter.

EOL indicates whether or not the ErrEOL string was found on the end of Text. If the ErrEOL string was found, then EOL is True; otherwise, it is False.

When the error stream is closed by the server, a string containing only one NULL character is delivered through this event.

Stdout Event (Rexec Component)

This event is fired when data (complete lines) come in through stdout.

Syntax

public event OnStdoutHandler OnStdout;

public delegate void OnStdoutHandler(object sender, RexecStdoutEventArgs e);

public class RexecStdoutEventArgs : EventArgs {
  public string Text { get; }
public byte[] TextB { get; } public bool EOL { get; } }
Public Event OnStdout As OnStdoutHandler

Public Delegate Sub OnStdoutHandler(sender As Object, e As RexecStdoutEventArgs)

Public Class RexecStdoutEventArgs Inherits EventArgs
  Public ReadOnly Property Text As String
Public ReadOnly Property TextB As Byte() Public ReadOnly Property EOL As Boolean End Class

Remarks

The Stdout event is fired every time the process on the remote host outputs a line in its standard output. The incoming data are provided through the Text parameter.

EOL indicates whether or not the EOL string was found on the end of Text. If the EOL string was found, then EOL is True; otherwise, it is False.

Firewall Type

This is the firewall the component will connect through.

Remarks

When connecting through a firewall, this type is used to specify different properties of the firewall, such as the firewall Host and the FirewallType.

Fields

AutoDetect
bool

Default Value: False

This field tells the component whether or not to automatically detect and use firewall system settings, if available.

FirewallType
FirewallTypes

Default Value: 0

This field determines the type of firewall to connect through. The applicable values are as follows:

fwNone (0)No firewall (default setting).
fwTunnel (1)Connect through a tunneling proxy. Port is set to 80.
fwSOCKS4 (2)Connect through a SOCKS4 Proxy. Port is set to 1080.
fwSOCKS5 (3)Connect through a SOCKS5 Proxy. Port is set to 1080.
fwSOCKS4A (10)Connect through a SOCKS4A Proxy. Port is set to 1080.

Host
string

Default Value: ""

This field contains the name or IP address of firewall (optional). If a Host is given, the requested connections will be authenticated through the specified firewall when connecting.

If this field is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, this field is set to the corresponding address. If the search is not successful, the component throws an exception.

Password
string

Default Value: ""

This field contains a password if authentication is to be used when connecting through the firewall. If Host is specified, the User and Password fields are used to connect and authenticate to the given firewall. If the authentication fails, the component throws an exception.

Port
int

Default Value: 0

This field contains the transmission control protocol (TCP) port for the firewall Host. See the description of the Host field for details.

Note: This field is set automatically when FirewallType is set to a valid value. See the description of the FirewallType field for details.

User
string

Default Value: ""

This field contains a user name if authentication is to be used connecting through a firewall. If the Host is specified, this field and Password fields are used to connect and authenticate to the given Firewall. If the authentication fails, the component throws an exception.

Constructors

public Firewall();
Public Firewall()

Config Settings (Rexec Component)

The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

Rexec/Rshell Config Settings

EnableStderr:   Enables or disables secondary (stderr) stream.

Some systems (most notably certain versions of Linux) do not support the secondary stderr stream of rexec/rshell. For these systems, you must turn stderr off. Any stderr output will then be provided through stdout.

The default value for this configuration setting is True.

MaxStderr:   Maximum storage available for the stderr buffer.

This configuration setting indicates the maximum amount of characters that the component will store in the Stderr property. The default value is -1, which indicates there is no maximum. A value of zero (0) will disable accumulation of stderr in the Stderr property, although the Stderr event will still continue to fire.

MaxStdout:   Maximum storage available for the stdout buffer.

This configuration setting indicates the maximum amount of characters that the component will store in the Stdout property. The default value is -1, which indicates there is no maximum. A value of zero (0) will disable accumulation of stdout in the Stdout property, although the Stdout event will still continue to fire.

StderrPort:   The local port from which the remote system sends the stderr stream.

The default value is zero, which instructs the component to use a random port. Use this property with caution. If you supply a value, it must be an available port on the system or an error will be returned.

Some systems do not support secondary stderr streams. Please refer to the EnableStderr configuration setting for more information.

TCPClient Config Settings

CloseStreamAfterTransfer:   If true, the component will close the upload or download stream after the transfer.

This setting determines whether the input or output stream is closed after the transfer completes. When set to True (default), all streams will be closed after a transfer is completed. In order to keep streams open after the transfer of data, set this to False. the default value is True.

ConnectionTimeout:   Sets a separate timeout value for establishing a connection.

When set, this configuration setting allows you to specify a different timeout value for establishing a connection. Otherwise, the component will use Timeout for establishing a connection and transmitting/receiving data.

FirewallAutoDetect:   Tells the component whether or not to automatically detect and use firewall system settings, if available.

This configuration setting is provided for use by components that do not directly expose Firewall properties.

FirewallHost:   Name or IP address of firewall (optional).

If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost setting is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost setting is set to the corresponding address. If the search is not successful, an error is returned.

Note: This setting is provided for use by components that do not directly expose Firewall properties.

FirewallListener:   If true, the component binds to a SOCKS firewall as a server (TCPClient only).

This entry is for TCPClient only and does not work for other components that descend from TCPClient.

If this entry is set, the component acts as a server. RemoteHost and RemotePort are used to tell the SOCKS firewall in which address and port to listen to. The firewall rules may ignore RemoteHost, and it is recommended that RemoteHost be set to empty string in this case.

RemotePort is the port in which the firewall will listen to. If set to 0, the firewall will select a random port. The binding (address and port) is provided through the ConnectionStatus event.

The connection to the firewall is made by calling the Connect method.

FirewallPassword:   Password to be used if authentication is to be used when connecting through the firewall.

If FirewallHost is specified, the FirewallUser and FirewallPassword settings are used to connect and authenticate to the given firewall. If the authentication fails, the component throws an exception.

Note: This setting is provided for use by components that do not directly expose Firewall properties.

FirewallPort:   The TCP port for the FirewallHost;.

The FirewallPort is set automatically when FirewallType is set to a valid value.

Note: This configuration setting is provided for use by components that do not directly expose Firewall properties.

FirewallType:   Determines the type of firewall to connect through.

The appropriate values are as follows:

0No firewall (default setting).
1Connect through a tunneling proxy. FirewallPort is set to 80.
2Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
3Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.
10Connect through a SOCKS4A Proxy. FirewallPort is set to 1080.

Note: This setting is provided for use by components that do not directly expose Firewall properties.

FirewallUser:   A user name if authentication is to be used connecting through a firewall.

If the FirewallHost is specified, the FirewallUser and FirewallPassword settings are used to connect and authenticate to the Firewall. If the authentication fails, the component throws an exception.

Note: This setting is provided for use by components that do not directly expose Firewall properties.

KeepAliveInterval:   The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.

When set, TCPKeepAlive will automatically be set to True. A TCP keep-alive packet will be sent after a period of inactivity as defined by KeepAliveTime. If no acknowledgment is received from the remote host, the keep-alive packet will be sent again. This configuration setting specifies the interval at which the successive keep-alive packets are sent in milliseconds. This system default if this value is not specified here is 1 second.

Note: This value is not applicable in macOS.

KeepAliveTime:   The inactivity time in milliseconds before a TCP keep-alive packet is sent.

When set, TCPKeepAlive will automatically be set to True. By default, the operating system will determine the time a connection is idle before a Transmission Control Protocol (TCP) keep-alive packet is sent. This system default if this value is not specified here is 2 hours. In many cases, a shorter interval is more useful. Set this value to the desired interval in milliseconds.

Linger:   When set to True, connections are terminated gracefully.

This property controls how a connection is closed. The default is True.

In the case that Linger is True (default), two scenarios determine how long the connection will linger. In the first, if LingerTime is 0 (default), the system will attempt to send pending data for a connection until the default IP timeout expires.

In the second scenario, if LingerTime is a positive value, the system will attempt to send pending data until the specified LingerTime is reached. If this attempt fails, then the system will reset the connection.

The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the component returns control immediately, the system could hold system resources until all pending data are sent (even after your application closes).

Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (e.g., by a client acknowledgment), setting this property to False might be the appropriate course of action.

LingerTime:   Time in seconds to have the connection linger.

LingerTime is the time, in seconds, the socket connection will linger. This value is 0 by default, which means it will use the default IP timeout.

LocalHost:   The name of the local host through which connections are initiated or accepted.

The LocalHost setting contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the component initiate connections (or accept in the case of server components) only through that interface.

If the component is connected, the LocalHost setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

LocalPort:   The port in the local host where the component binds.

This must be set before a connection is attempted. It instructs the component to bind to a specific port (or communication endpoint) in the local machine.

Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by LocalPort after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.

This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.

MaxLineLength:   The maximum amount of data to accumulate when no EOL is found.

MaxLineLength is the size of an internal buffer, which holds received data while waiting for an EOL string.

If an EOL string is found in the input stream before MaxLineLength bytes are received, the DataIn event is fired with the EOL parameter set to True, and the buffer is reset.

If no EOL is found, and MaxLineLength bytes are accumulated in the buffer, the DataIn event is fired with the EOL parameter set to False, and the buffer is reset.

The minimum value for MaxLineLength is 256 bytes. The default value is 2048 bytes.

MaxTransferRate:   The transfer rate limit in bytes per second.

This configuration setting can be used to throttle outbound TCP traffic. Set this to the number of bytes to be sent per second. By default, this is not set and there is no limit.

ProxyExceptionsList:   A semicolon separated list of hosts and IPs to bypass when using a proxy.

This configuration setting optionally specifies a semicolon-separated list of hostnames or IP addresses to bypass when a proxy is in use. When requests are made to hosts specified in this property, the proxy will not be used. For instance:

www.google.com;www.nsoftware.com

TCPKeepAlive:   Determines whether or not the keep alive socket option is enabled.

If set to True, the socket's keep-alive option is enabled and keep-alive packets will be sent periodically to maintain the connection. Set KeepAliveTime and KeepAliveInterval to configure the timing of the keep-alive packets.

Note: This value is not applicable in Java.

TcpNoDelay:   Whether or not to delay when sending packets.

When true, the socket will send all data that is ready to send at once. When false, the socket will send smaller buffered packets of data at small intervals. This is known as the Nagle algorithm.

By default, this config is set to false.

UseIPv6:   Whether to use IPv6.

When set to 0 (default), the component will use IPv4 exclusively. When set to 1, the component will use IPv6 exclusively. To instruct the component to prefer IPv6 addresses, but use IPv4 if IPv6 is not supported on the system, this setting should be set to 2. The default value is 0. Possible values are:

0 IPv4 Only
1 IPv6 Only
2 IPv6 with IPv4 fallback
UseNTLMv2:   Whether to use NTLM V2.

When authenticating with NTLM, this setting specifies whether NTLM V2 is used. By default this value is False and NTLM V1 will be used. Set this to True to use NTLM V2.

SSL Config Settings

CACertFilePaths:   The paths to CA certificate files when using Mono on Unix/Linux.

This setting specifies the paths on disk to CA certificate files when using Mono on Unix/Linux. It is not applicable in any other circumstances.

The value is formatted as a list of paths separated by semicolons. The component will check for the existence of each file in the order specified. When a file is found the CA certificates within the file will be loaded and used to determine the validity of server or client certificates.

The default value is:

/etc/ssl/ca-bundle.pem;/etc/pki/tls/certs/ca-bundle.crt;/etc/ssl/certs/ca-certificates.crt;/etc/pki/tls/cacert.pem

LogSSLPackets:   Controls whether SSL packets are logged when using the internal security API.

When SSLProvider is set to Internal, this setting controls whether SSL packets should be logged. By default, this setting is False, as it is only useful for debugging purposes.

When enabled, SSL packet logs are output using the SSLStatus event, which will fire each time an SSL packet is sent or received.

Enabling this setting has no effect if SSLProvider is set to Platform.

ReuseSSLSession:   Determines if the SSL session is reused.

If set to true, the component will reuse the context if and only if the following criteria are met:

  • The target host name is the same.
  • The system cache entry has not expired (default timeout is 10 hours).
  • The application process that calls the function is the same.
  • The logon session is the same.
  • The instance of the component is the same.

SSLCACerts:   A newline separated list of CA certificate to use during SSL client authentication.

This setting specifies one or more CA certificates to be included in the request when performing SSL client authentication. Some servers require the entire chain, including CA certificates, to be presented when performing SSL client authentication. The value of this setting is a newline (CrLf) separated list of certificates. For instance:

-----BEGIN CERTIFICATE-----
MIIEKzCCAxOgAwIBAgIRANTET4LIkxdH6P+CFIiHvTowDQYJKoZIhvcNAQELBQAw
...
eWHV5OW1K53o/atv59sOiW5K3crjFhsBOd5Q+cJJnU+SWinPKtANXMht+EDvYY2w
F0I1XhM+pKj7FjDr+XNj
-----END CERTIFICATE-----
\r \n
-----BEGIN CERTIFICATE-----
MIIEFjCCAv6gAwIBAgIQetu1SMxpnENAnnOz1P+PtTANBgkqhkiG9w0BAQUFADBp
..
d8q23djXZbVYiIfE9ebr4g3152BlVCHZ2GyPdjhIuLeH21VbT/dyEHHA
-----END CERTIFICATE-----

SSLCheckCRL:   Whether to check the Certificate Revocation List for the server certificate.

This setting specifies whether the component will check the Certificate Revocation List specified by the server certificate. If set to 1 or 2, the component will first obtain the list of CRL URLs from the server certificate's CRL distribution points extension. The component will then make HTTP requests to each CRL endpoint to check the validity of the server's certificate. If the certificate has been revoked or any other issues are found during validation the component throws an exception.

When set to 0 (default) the CRL check will not be performed by the component. When set to 1, it will attempt to perform the CRL check, but will continue without an error if the server's certificate does not support CRL. When set to 2, it will perform the CRL check and will throw an error if CRL is not supported.

This configuration setting is only supported in the Java, C#, and C++ editions. In the C++ edition, it is only supported on Windows operating systems.

SSLCheckOCSP:   Whether to use OCSP to check the status of the server certificate.

This setting specifies whether the component will use OCSP to check the validity of the server certificate. If set to 1 or 2, the component will first obtain the OCSP URL from the server certificate's OCSP extension. The component will then locate the issuing certificate and make an HTTP request to the OCSP endpoint to check the validity of the server's certificate. If the certificate has been revoked or any other issues are found during validation the component throws an exception.

When set to 0 (default) the component will not perform an OCSP check. When set to 1, it will attempt to perform the OCSP check, but will continue without an error if the server's certificate does not support OCSP. When set to 2, it will perform the OCSP check and will throw an error if OCSP is not supported.

This configuration setting is only supported in the Java, C#, and C++ editions. In the C++ edition, it is only supported on Windows operating systems.

SSLCipherStrength:   The minimum cipher strength used for bulk encryption.

This minimum cipher strength largely dependent on the security modules installed on the system. If the cipher strength specified is not supported, an error will be returned when connections are initiated.

Please note that this setting contains the minimum cipher strength requested from the security library. The actual cipher strength used for the connection is shown by the SSLStatus event.

Use this setting with caution. Requesting a lower cipher strength than necessary could potentially cause serious security vulnerabilities in your application.

When the provider is OpenSSL, SSLCipherStrength is currently not supported. This functionality is instead made available through the OpenSSLCipherList config setting.

SSLEnabledCipherSuites:   The cipher suite to be used in an SSL negotiation.

The enabled cipher suites to be used in SSL negotiation.

By default, the enabled cipher suites will include all available ciphers ("*").

The special value "*" means that the component will pick all of the supported cipher suites. If SSLEnabledCipherSuites is set to any other value, only the specified cipher suites will be considered.

Multiple cipher suites are separated by semicolons.

Example values when SSLProvider is set to Platform: obj.config("SSLEnabledCipherSuites=*"); obj.config("SSLEnabledCipherSuites=CALG_AES_256"); obj.config("SSLEnabledCipherSuites=CALG_AES_256;CALG_3DES"); Possible values when SSLProvider is set to Platform include:

  • CALG_3DES
  • CALG_3DES_112
  • CALG_AES
  • CALG_AES_128
  • CALG_AES_192
  • CALG_AES_256
  • CALG_AGREEDKEY_ANY
  • CALG_CYLINK_MEK
  • CALG_DES
  • CALG_DESX
  • CALG_DH_EPHEM
  • CALG_DH_SF
  • CALG_DSS_SIGN
  • CALG_ECDH
  • CALG_ECDH_EPHEM
  • CALG_ECDSA
  • CALG_ECMQV
  • CALG_HASH_REPLACE_OWF
  • CALG_HUGHES_MD5
  • CALG_HMAC
  • CALG_KEA_KEYX
  • CALG_MAC
  • CALG_MD2
  • CALG_MD4
  • CALG_MD5
  • CALG_NO_SIGN
  • CALG_OID_INFO_CNG_ONLY
  • CALG_OID_INFO_PARAMETERS
  • CALG_PCT1_MASTER
  • CALG_RC2
  • CALG_RC4
  • CALG_RC5
  • CALG_RSA_KEYX
  • CALG_RSA_SIGN
  • CALG_SCHANNEL_ENC_KEY
  • CALG_SCHANNEL_MAC_KEY
  • CALG_SCHANNEL_MASTER_HASH
  • CALG_SEAL
  • CALG_SHA
  • CALG_SHA1
  • CALG_SHA_256
  • CALG_SHA_384
  • CALG_SHA_512
  • CALG_SKIPJACK
  • CALG_SSL2_MASTER
  • CALG_SSL3_MASTER
  • CALG_SSL3_SHAMD5
  • CALG_TEK
  • CALG_TLS1_MASTER
  • CALG_TLS1PRF
Example values when SSLProvider is set to Internal: obj.config("SSLEnabledCipherSuites=*"); obj.config("SSLEnabledCipherSuites=TLS_DHE_DSS_WITH_AES_128_CBC_SHA"); obj.config("SSLEnabledCipherSuites=TLS_DHE_DSS_WITH_AES_128_CBC_SHA;TLS_DH_ANON_WITH_AES_128_CBC_SHA"); Possible values when SSLProvider is set to Internal include:
  • TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
  • TLS_RSA_WITH_AES_256_GCM_SHA384
  • TLS_RSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
  • TLS_DHE_DSS_WITH_AES_256_GCM_SHA384
  • TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
  • TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  • TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
  • TLS_DH_RSA_WITH_AES_128_GCM_SHA256 (Not Recommended)
  • TLS_DH_RSA_WITH_AES_256_GCM_SHA384 (Not Recommended)
  • TLS_DH_DSS_WITH_AES_128_GCM_SHA256 (Not Recommended)
  • TLS_DH_DSS_WITH_AES_256_GCM_SHA384 (Not Recommended)
  • TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
  • TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
  • TLS_RSA_WITH_AES_256_CBC_SHA256
  • TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
  • TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
  • TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
  • TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  • TLS_RSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
  • TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
  • TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
  • TLS_RSA_WITH_AES_256_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  • TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
  • TLS_DHE_RSA_WITH_AES_256_CBC_SHA
  • TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
  • TLS_DHE_DSS_WITH_AES_256_CBC_SHA
  • TLS_RSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  • TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
  • TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
  • TLS_DHE_RSA_WITH_AES_128_CBC_SHA
  • TLS_DHE_DSS_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
  • TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
  • TLS_RSA_WITH_3DES_EDE_CBC_SHA
  • TLS_RSA_WITH_DES_CBC_SHA
  • TLS_DHE_RSA_WITH_DES_CBC_SHA
  • TLS_DHE_DSS_WITH_DES_CBC_SHA
  • TLS_RSA_WITH_RC4_128_MD5
  • TLS_RSA_WITH_RC4_128_SHA

When TLS 1.3 is negotiated (see SSLEnabledProtocols) only the following cipher suites are supported:

  • TLS_AES_256_GCM_SHA384
  • TLS_CHACHA20_POLY1305_SHA256
  • TLS_AES_128_GCM_SHA256

SSLEnabledCipherSuites is used together with SSLCipherStrength.

SSLEnabledProtocols:   Used to enable/disable the supported security protocols.

Used to enable/disable the supported security protocols.

Not all supported protocols are enabled by default (the value of this setting is 4032). If you want more granular control over the enabled protocols, you can set this property to the binary 'OR' of one or more of the following values:

TLS1.312288 (Hex 3000)
TLS1.23072 (Hex C00) (Default)
TLS1.1768 (Hex 300) (Default)
TLS1 192 (Hex C0) (Default)
SSL3 48 (Hex 30)
SSL2 12 (Hex 0C)

SSLEnabledProtocols - TLS 1.3 Notes

By default when TLS 1.3 is enabled the component will use the internal TLS implementation when the SSLProvider is set to Automatic for all editions.

In editions which are designed to run on Windows SSLProvider can be set to Platform to use the platform implementation instead of the internal implementation. When configured in this manner, please note that the platform provider is only supported on Windows 11 / Windows Server 2022 and up. The default internal provider is available on all platforms and is not restricted to any specific OS version.

If set to 1 (Platform provider) please be aware of the following notes:

  • The platform provider is only available on Windows 11 / Windows Server 2022 and up.
  • SSLEnabledCipherSuites and other similar SSL configuration settings are not supported.
  • If SSLEnabledProtocols includes both TLS 1.3 and TLS 1.2 the above restrictions are still applicable even if TLS 1.2 is negotiated. Enabling TLS 1.3 with the platform provider changes the implementation used for all TLS versions.

SSLEnableRenegotiation:   Whether the renegotiation_info SSL extension is supported.

This setting specifies whether the renegotiation_info SSL extension will be used in the request when using the internal security API. This setting is true by default, but can be set to false to disable the extension.

This setting is only applicable when SSLProvider is set to Internal.

SSLIncludeCertChain:   Whether the entire certificate chain is included in the SSLServerAuthentication event.

This setting specifies whether the Encoded parameter of the SSLServerAuthentication event contains the full certificate chain. By default this value is False and only the leaf certificate will be present in the Encoded parameter of the SSLServerAuthentication event.

If set to True all certificates returned by the server will be present in the Encoded parameter of the SSLServerAuthentication event. This includes the leaf certificate, any intermediate certificate, and the root certificate.

Note: When SSLProvider is set to Internal this value is automatically set to true. This is needed for proper validation when using the internal provider.

SSLKeyLogFile:   The location of a file where per-session secrets are written for debugging purposes.

This setting optionally specifies the full path to a file on disk where per-session secrets are stored for debugging purposes.

When set, the component will save the session secrets in the same format as the SSLKEYLOGFILE environment variable functionality used by most major browsers and tools such as Chrome, Firefox, and cURL. This file can then be used in tools such as Wireshark to decrypt TLS traffice for debugging purposes. When writing to this file the component will only append, it will not overwrite previous values.

Note: This setting is only applicable when SSLProvider is set to Internal.

SSLNegotiatedCipher:   Returns the negotiated cipher suite.

Returns the cipher suite negotiated during the SSL handshake.

Note: For server components (e.g. TCPServer) this is a per-connection setting accessed by passing the ConnectionId. For example: server.Config("SSLNegotiatedCipher[connId]");

SSLNegotiatedCipherStrength:   Returns the negotiated cipher suite strength.

Returns the strength of the cipher suite negotiated during the SSL handshake.

Note: For server components (e.g.TCPServer) this is a per-connection setting accessed by passing the ConnectionId. For example: server.Config("SSLNegotiatedCipherStrength[connId]");

SSLNegotiatedCipherSuite:   Returns the negotiated cipher suite.

Returns the cipher suite negotiated during the SSL handshake represented as a single string.

Note: For server components (e.g. TCPServer) this is a per-connection setting accessed by passing the ConnectionId. For example: server.Config("SSLNegotiatedCipherSuite[connId]");

SSLNegotiatedKeyExchange:   Returns the negotiated key exchange algorithm.

Returns the key exchange algorithm negotiated during the SSL handshake.

Note: For server components (e.g. TCPServer) this is a per-connection setting accessed by passing the ConnectionId. For example: server.Config("SSLNegotiatedKeyExchange[connId]");

SSLNegotiatedKeyExchangeStrength:   Returns the negotiated key exchange algorithm strength.

Returns the strenghth of the key exchange algorithm negotiated during the SSL handshake.

Note: For server components (e.g. TCPServer) this is a per-connection setting accessed by passing the ConnectionId. For example: server.Config("SSLNegotiatedKeyExchangeStrength[connId]");

SSLNegotiatedVersion:   Returns the negotiated protocol version.

Returns the protocol version negotiated during the SSL handshake.

Note: For server components (e.g. TCPServer) this is a per-connection setting accessed by passing the ConnectionId. For example: server.Config("SSLNegotiatedVersion[connId]");

SSLSecurityFlags:   Flags that control certificate verification.

The following flags are defined (specified in hexadecimal notation). They can be or-ed together to exclude multiple conditions:

0x00000001Ignore time validity status of certificate.
0x00000002Ignore time validity status of CTL.
0x00000004Ignore non-nested certificate times.
0x00000010Allow unknown Certificate Authority.
0x00000020Ignore wrong certificate usage.
0x00000100Ignore unknown certificate revocation status.
0x00000200Ignore unknown CTL signer revocation status.
0x00000400Ignore unknown Certificate Authority revocation status.
0x00000800Ignore unknown Root revocation status.
0x00008000Allow test Root certificate.
0x00004000Trust test Root certificate.
0x80000000Ignore non-matching CN (certificate CN not-matching server name).

This functionality is currently not available in Java or when the provider is OpenSSL.

SSLServerCACerts:   A newline separated list of CA certificate to use during SSL server certificate validation.

This setting optionally specifies one or more CA certificates to be used when verifying the server certificate. When verifying the server's certificate the certificates trusted by the system will be used as part of the verification process. If the server's CA certificates are not installed to the trusted system store, they may be specified here so they are included when performing the verification process. This setting should only be set if the server's CA certificates are not already trusted on the system and cannot be installed to the trusted system store.

The value of this setting is a newline (CrLf) separated list of certificates. For instance:

-----BEGIN CERTIFICATE-----
MIIEKzCCAxOgAwIBAgIRANTET4LIkxdH6P+CFIiHvTowDQYJKoZIhvcNAQELBQAw
...
eWHV5OW1K53o/atv59sOiW5K3crjFhsBOd5Q+cJJnU+SWinPKtANXMht+EDvYY2w
F0I1XhM+pKj7FjDr+XNj
-----END CERTIFICATE-----
\r \n
-----BEGIN CERTIFICATE-----
MIIEFjCCAv6gAwIBAgIQetu1SMxpnENAnnOz1P+PtTANBgkqhkiG9w0BAQUFADBp
..
d8q23djXZbVYiIfE9ebr4g3152BlVCHZ2GyPdjhIuLeH21VbT/dyEHHA
-----END CERTIFICATE-----

TLS12SignatureAlgorithms:   Defines the allowed TLS 1.2 signature algorithms when SSLProvider is set to Internal.

This setting specifies the allowed server certificate signature algorithms when SSLProvider is set to Internal and SSLEnabledProtocols is set to allow TLS 1.2.

When specified the component will verify that the server certificate signature algorithm is among the values specified in this setting. If the server certificate signature algorithm is unsupported the component throws an exception.

The format of this value is a comma separated list of hash-signature combinations. For instance: component.SSLProvider = TCPClientSSLProviders.sslpInternal; component.Config("SSLEnabledProtocols=3072"); //TLS 1.2 component.Config("TLS12SignatureAlgorithms=sha256-rsa,sha256-dsa,sha1-rsa,sha1-dsa"); The default value for this setting is sha512-ecdsa,sha512-rsa,sha512-dsa,sha384-ecdsa,sha384-rsa,sha384-dsa,sha256-ecdsa,sha256-rsa,sha256-dsa,sha224-ecdsa,sha224-rsa,sha224-dsa,sha1-ecdsa,sha1-rsa,sha1-dsa.

In order to not restrict the server's certificate signature algorithm, specify an empty string as the value for this setting, which will cause the signature_algorithms TLS 1.2 extension to not be sent.

TLS12SupportedGroups:   The supported groups for ECC.

This setting specifies a comma separated list of named groups used in TLS 1.2 for ECC.

The default value is ecdhe_secp256r1,ecdhe_secp384r1,ecdhe_secp521r1.

When using TLS 1.2 and SSLProvider is set to Internal, the values refer to the supported groups for ECC. The following values are supported:

  • "ecdhe_secp256r1" (default)
  • "ecdhe_secp384r1" (default)
  • "ecdhe_secp521r1" (default)

TLS13KeyShareGroups:   The groups for which to pregenerate key shares.

This setting specifies a comma separated list of named groups used in TLS 1.3 for key exchange. The groups specified here will have key share data pregenerated locally before establishing a connection. This can prevent an additional round trip during the handshake if the group is supported by the server.

The default value is set to balance common supported groups and the computational resources required to generate key shares. As a result only some groups are included by default in this setting.

Note: All supported groups can always be used during the handshake even if not listed here, but if a group is used which is not present in this list it will incur an additional round trip and time to generate the key share for that group.

In most cases this setting does not need to be modified. This should only be modified if there is a specific reason to do so.

The default value is ecdhe_x25519,ecdhe_secp256r1,ecdhe_secp384r1,ffdhe_2048,ffdhe_3072

The values are ordered from most preferred to least preferred. The following values are supported:

  • "ecdhe_x25519" (default)
  • "ecdhe_x448"
  • "ecdhe_secp256r1" (default)
  • "ecdhe_secp384r1" (default)
  • "ecdhe_secp521r1"
  • "ffdhe_2048" (default)
  • "ffdhe_3072" (default)
  • "ffdhe_4096"
  • "ffdhe_6144"
  • "ffdhe_8192"

TLS13SignatureAlgorithms:   The allowed certificate signature algorithms.

This setting holds a comma separated list of allowed signature algorithms. Possible values are:

  • "ed25519" (default)
  • "ed448" (default)
  • "ecdsa_secp256r1_sha256" (default)
  • "ecdsa_secp384r1_sha384" (default)
  • "ecdsa_secp521r1_sha512" (default)
  • "rsa_pkcs1_sha256" (default)
  • "rsa_pkcs1_sha384" (default)
  • "rsa_pkcs1_sha512" (default)
  • "rsa_pss_sha256" (default)
  • "rsa_pss_sha384" (default)
  • "rsa_pss_sha512" (default)
The default value is rsa_pss_sha256,rsa_pss_sha384,rsa_pss_sha512,rsa_pkcs1_sha256,rsa_pkcs1_sha384,rsa_pkcs1_sha512,ecdsa_secp256r1_sha256,ecdsa_secp384r1_sha384,ecdsa_secp521r1_sha512,ed25519,ed448. This setting is only applicable when SSLEnabledProtocols includes TLS 1.3.
TLS13SupportedGroups:   The supported groups for (EC)DHE key exchange.

This setting specifies a comma separated list of named groups used in TLS 1.3 for key exchange. This setting should only be modified if there is a specific reason to do so.

The default value is ecdhe_x25519,ecdhe_x448,ecdhe_secp256r1,ecdhe_secp384r1,ecdhe_secp521r1,ffdhe_2048,ffdhe_3072,ffdhe_4096,ffdhe_6144,ffdhe_8192

The values are ordered from most preferred to least preferred. The following values are supported:

  • "ecdhe_x25519" (default)
  • "ecdhe_x448" (default)
  • "ecdhe_secp256r1" (default)
  • "ecdhe_secp384r1" (default)
  • "ecdhe_secp521r1" (default)
  • "ffdhe_2048" (default)
  • "ffdhe_3072" (default)
  • "ffdhe_4096" (default)
  • "ffdhe_6144" (default)
  • "ffdhe_8192" (default)

Socket Config Settings

AbsoluteTimeout:   Determines whether timeouts are inactivity timeouts or absolute timeouts.

If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.

Note: This option is not valid for UDP ports.

FirewallData:   Used to send extra data to the firewall.

When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).

InBufferSize:   The size in bytes of the incoming queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be receiving. Increasing the value of the InBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the component is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

OutBufferSize:   The size in bytes of the outgoing queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be sending. Increasing the value of the OutBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the component is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

Base Config Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

GUIAvailable:   Tells the component whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The component will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications, an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GUIAvailable to false will ensure that the component does not attempt to process external events.

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a component is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g., RuntimeLicense, License File).
  • License Type: The type of license installed (e.g., Royalty Free, Single Server).
  • Last Valid Build: The last valid build number for which the license will work.
MaskSensitive:   Whether sensitive data is masked in log messages.

In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to true to mask sensitive data. The default is true.

This setting only works on these components: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.

UseInternalSecurityAPI:   Tells the component whether or not to use the system security libraries or an internal implementation.

When set to false, the component will use the system security libraries by default to perform cryptographic functions where applicable. In this case, calls to unmanaged code will be made. In certain environments this is not desirable. To use a completely managed security implementation set this setting to true.

Setting this setting to true tells the component to use the internal implementation instead of using the system security libraries.

On Windows, this setting is set to false by default. On Linux/macOS, this setting is set to true by default.

If using the .NET Standard Library, this setting will be true on all platforms. The .NET Standard library does not support using the system security libraries.

Note: This setting is static. The value set is applicable to all components used in the application.

When this value is set the product's system DLL is no longer required as a reference, as all unmanaged code is stored in that file.

Trappable Errors (Rexec Component)

RExec Errors

118   Firewall error. Error message includes a detailed description.

The component may also return one of the following error codes, which are inherited from other components.

TCPClient Errors

100   You cannot change the RemotePort at this time. A connection is in progress.
101   You cannot change the RemoteHost (Server) at this time. A connection is in progress.
102   The RemoteHost address is invalid (0.0.0.0).
104   Already connected. If you want to reconnect, close the current connection first.
106   You cannot change the LocalPort at this time. A connection is in progress.
107   You cannot change the LocalHost at this time. A connection is in progress.
112   You cannot change MaxLineLength at this time. A connection is in progress.
116   RemotePort cannot be zero. Please specify a valid service port number.
117   You cannot change the UseConnection option while the component is active.
135   Operation would block.
201   Timeout.
211   Action impossible in control's present state.
212   Action impossible while not connected.
213   Action impossible while listening.
301   Timeout.
303   Could not open file.
434   Unable to convert string to selected CodePage.
1105   Already connecting. If you want to reconnect, close the current connection first.
1117   You need to connect first.
1119   You cannot change the LocalHost at this time. A connection is in progress.
1120   Connection dropped by remote host.

SSL Errors

270   Cannot load specified security library.
271   Cannot open certificate store.
272   Cannot find specified certificate.
273   Cannot acquire security credentials.
274   Cannot find certificate chain.
275   Cannot verify certificate chain.
276   Error during handshake.
280   Error verifying certificate.
281   Could not find client certificate.
282   Could not find server certificate.
283   Error encrypting data.
284   Error decrypting data.

TCP/IP Errors

10004   [10004] Interrupted system call.
10009   [10009] Bad file number.
10013   [10013] Access denied.
10014   [10014] Bad address.
10022   [10022] Invalid argument.
10024   [10024] Too many open files.
10035   [10035] Operation would block.
10036   [10036] Operation now in progress.
10037   [10037] Operation already in progress.
10038   [10038] Socket operation on non-socket.
10039   [10039] Destination address required.
10040   [10040] Message too long.
10041   [10041] Protocol wrong type for socket.
10042   [10042] Bad protocol option.
10043   [10043] Protocol not supported.
10044   [10044] Socket type not supported.
10045   [10045] Operation not supported on socket.
10046   [10046] Protocol family not supported.
10047   [10047] Address family not supported by protocol family.
10048   [10048] Address already in use.
10049   [10049] Can't assign requested address.
10050   [10050] Network is down.
10051   [10051] Network is unreachable.
10052   [10052] Net dropped connection or reset.
10053   [10053] Software caused connection abort.
10054   [10054] Connection reset by peer.
10055   [10055] No buffer space available.
10056   [10056] Socket is already connected.
10057   [10057] Socket is not connected.
10058   [10058] Can't send after socket shutdown.
10059   [10059] Too many references, can't splice.
10060   [10060] Connection timed out.
10061   [10061] Connection refused.
10062   [10062] Too many levels of symbolic links.
10063   [10063] File name too long.
10064   [10064] Host is down.
10065   [10065] No route to host.
10066   [10066] Directory not empty
10067   [10067] Too many processes.
10068   [10068] Too many users.
10069   [10069] Disc Quota Exceeded.
10070   [10070] Stale NFS file handle.
10071   [10071] Too many levels of remote in path.
10091   [10091] Network subsystem is unavailable.
10092   [10092] WINSOCK DLL Version out of range.
10093   [10093] Winsock not loaded yet.
11001   [11001] Host not found.
11002   [11002] Non-authoritative 'Host not found' (try again or check DNS setup).
11003   [11003] Non-recoverable errors: FORMERR, REFUSED, NOTIMP.
11004   [11004] Valid name, no data record (check DNS setup).