MLLPServer Component
Properties Methods Events Config Settings Errors
The MLLPServer component implements the server side of the Minimal Lower Layer Protocol.
Syntax
nsoftware.IPWorksEDI.MLLPServer
Remarks
The MLLPServer component is used to exchange HL7 data with one or more connected MLLP clients.
Setting up MLLPServer to Listen for Client Connections
The first step in using the MLLPServer component is to configure it to listen for MLLP client connections. Start by setting the LocalPort property to the desired listening port. For multi-homed devices, also set the LocalHost property to the address of the network interface the MLLPServer component should listen on.
Next, optionally enable TLS/SSL with the SSLEnabled and SSLCert properties (MLLPServer supports client authentication with the SSLAuthenticateClients property).
Finally, set the Listening property to True to begin listening for client connections.
Connecting Example
mllpServer.LocalHost = "localhost";
mllpServer.LocalPort = 7777;
// The following two lines are only necessary if using TLS/SSL.
mllpServer.SSLEnabled = true;
mllpServer.SSLCert = new Certificate(CertStoreTypes.cstPFXFile, "..\\path\\to\\cert.pfx", "password", "*");
mllpServer.Listening = true;
At this point the ConnectionRequest event will fire anytime a client wishes to connect (connection requests are accepted by default), and the Connected event will fire each time a client successfully connects.
While clients are connected, the server may interact with them by using their ConnectionId to retrieve an MLLPConnection object from the Connections map property.
Receiving Data
The MLLPServer component will automatically receive HL7 data sent from each client, and will automatically send acknowledgements back.
When the MLLPServer component is receiving data, immediately before data transfer begins the StartTransfer event fires. During data transfer, one or more Transfer events will fire. When data transfer is complete, the EndTransfer event fires. Any errors during data delivery will cause the Error event to fire.
Immediately before the server acknowledgement is sent the AckOut event fires. The Accept parameter of this event is used to determine the type of acknowledgement (ACK or NAK) to send back to the client.
HL7 data received by the MLLPServer component will be stored in one of the following ways:
- If an output stream has been specified for the connection using the OutputStream field, the data is written to that stream.
- Otherwise, if an output file path has been set to the OutputFileName field, the data is written to that file.
- Otherwise, the data is stored in the OutputData field.
Sending Data
The MLLPServer component may also send data to MLLP clients. First, specify the data to send by doing one of the following:
- Set the InputStream field to a stream with HL7 data.
- Set the InputFileName field to the path of a file with HL7 data.
- Set the HL7 data directly to the InputData field.
Once the data has been specified, simply call the Send method with the appropriate connection Id to send the HL7 data to the associated client. Once the client has received the data, it will respond with an acknowledgement, causing the component's AckIn event to fire.
Sending Data Example
mllpServer.Connections[connectionId].InputData = "HL7Data";
mllpServer.Send(connectionId);
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
Connections | A map of connected clients. |
DefaultTimeout | This property includes an initial timeout value to be used by incoming connections. |
KeepAlive | When True, KEEPALIVE packets are enabled (for long connections). |
Listening | This property indicates whether the component is listening for incoming connections on LocalPort. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
LocalPort | This property includes the Transmission Control Protocol (TCP) port in the local host where the component listens. |
SSLAuthenticateClients | If set to True, the server asks the client(s) for a certificate. |
SSLCert | The certificate to be used during Secure Sockets Layer (SSL) negotiation. |
SSLEnabled | This property indicates whether Transport Layer Security/Secure Sockets Layer (TLS/SSL) is enabled. |
Version | The MLLP version to use. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting. |
Disconnect | This method disconnects the specified client. |
DoEvents | This method processes events from the internal message queue. |
Interrupt | This method interrupts a synchronous send to the remote host. |
Reset | This method will reset the component. |
Send | Send HL7 data to the MLLP client associated with the specified connection Id. |
Shutdown | This method shuts down the server. |
StartListening | This method starts listening for incoming connections. |
StopListening | This method stops listening for new connections. |
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.
AckIn | Fires immediately after receiving an acknowledgement from a client. |
AckOut | Fires immediately before sending an acknowledgement to a client. |
Connected | This event is fired immediately after a connection completes (or fails). |
ConnectionRequest | This event is fired when a request for connection comes from a remote host. |
Disconnected | This event is fired when a connection is closed. |
EndTransfer | Fires after incoming HL7 data finishes transferring. |
Error | This event fires information about errors during data delivery. |
Log | Provides logging information. |
SSLClientAuthentication | This event is fired when the client presents its credentials to the server. |
SSLConnectionRequest | This event fires when a Secure Sockets Layer (SSL) connection is requested. |
SSLStatus | This event is fired to show the progress of the secure connection. |
StartTransfer | Fires before incoming HL7 data begins transferring. |
Transfer | Fires during incoming data transfer. |
Config Settings
The following is a list of config settings for the component with short descriptions. Click on the links for further details.
ACKChar | The positive acknowledgement character. |
EndBlockChar | The character that denotes the end of HL7 data. |
EOLChar | The character that denotes the end of a message block. |
LogLevel | The level of detail that is logged. |
NAKChar | The negative acknowledgement character. |
ReceiveTimeout | Maximum number of seconds to wait after receiving a StartBlockChar. |
StartBlockChar | The character that denotes the beginning of HL7 data. |
CloseStreamAfterTransfer | If true, the component will close the upload or download stream after the transfer. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallListener | If true, the component binds to a SOCKS firewall as a server (TCPClient only). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseIPv6 | Whether to use IPv6. |
UseNTLMv2 | Whether to use NTLM V2. |
CACertFilePaths | The paths to CA certificate files when using Mono on Unix/Linux. |
LogSSLPackets | Controls whether SSL packets are logged when using the internal security API. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCACerts | A newline separated list of CA certificates to be included when performing an SSL handshake. |
SSLCheckCRL | Whether to check the Certificate Revocation List for the server certificate. |
SSLCheckOCSP | Whether to use OCSP to check the status of the server certificate. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLClientCACerts | A newline separated list of CA certificates to use during SSL client certificate validation. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLEnableRenegotiation | Whether the renegotiation_info SSL extension is supported. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLKeyLogFile | The location of a file where per-session secrets are written for debugging purposes. |
SSLNegotiatedCipher | Returns the negotiated cipher suite. |
SSLNegotiatedCipherStrength | Returns the negotiated cipher suite strength. |
SSLNegotiatedCipherSuite | Returns the negotiated cipher suite. |
SSLNegotiatedKeyExchange | Returns the negotiated key exchange algorithm. |
SSLNegotiatedKeyExchangeStrength | Returns the negotiated key exchange algorithm strength. |
SSLNegotiatedVersion | Returns the negotiated protocol version. |
SSLSecurityFlags | Flags that control certificate verification. |
SSLServerCACerts | A newline separated list of CA certificates to use during SSL server certificate validation. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when SSLProvider is set to Internal. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
BuildInfo | Information about the product's build. |
GUIAvailable | Whether or not a message loop is available for processing events. |
LicenseInfo | Information about the current license. |
MaskSensitiveData | Whether sensitive data is masked in log messages. |
UseFIPSCompliantAPI | Tells the component whether or not to use FIPS certified APIs. |
UseInternalSecurityAPI | Whether or not to use the system security libraries or an internal implementation. |
Connections Property (MLLPServer Component)
A map of connected clients.
Syntax
public MLLPConnectionMap Connections { get; }
Public ReadOnly Property Connections As MLLPConnectionMap
Remarks
This property is a collection that maps connection Ids to MLLP client connections. MLLPConnection objects are added to and removed from the collection as necessary as MLLP clients connect to and disconnect from the component.
Sending to Multiple Connected Clients Example
foreach (MLLPConnection conn in mllpServer.Connections.Values) {
conn.InputData = "HL7Data";
mllpServer.Send(conn.ConnectionId);
}
This property is read-only.
Please refer to the MLLPConnection type for a complete list of fields.DefaultTimeout Property (MLLPServer Component)
This property includes an initial timeout value to be used by incoming connections.
Syntax
Default Value
0
Remarks
This property is used by the component to set the operational timeout value of all inbound connections once they are established.
This property defines the timeout when sending data. When SSLEnabled is False, a value of 0 means data will be sent asynchronously, and a positive value means data is sent synchronously.
When SSLEnabled is True, all data are sent synchronously regardless of the Timeout value.
KeepAlive Property (MLLPServer Component)
When True, KEEPALIVE packets are enabled (for long connections).
Syntax
Default Value
False
Remarks
This property enables the SO_KEEPALIVE option on the incoming connections. This option prevents long connections from timing out in case of inactivity.
Note: System Transmission Control Protocol (TCP)/IP stack implementations are not required to support SO_KEEPALIVE.
This property is shared among incoming connections. When the property is set, the corresponding value is set for incoming connections as they are accepted. Existing connections are not modified.
Listening Property (MLLPServer Component)
This property indicates whether the component is listening for incoming connections on LocalPort.
Syntax
Default Value
False
Remarks
This property indicates whether the component is listening for connections on the port specified by the LocalPort property. Use the StartListening and StopListening methods to control whether the component is listening.
This property is read-only and not available at design time.
LocalHost Property (MLLPServer Component)
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
Syntax
Default Value
""
Remarks
This 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 multihomed hosts (machines with more than one IP interface) setting LocalHost to the IP address of an interface will make the component initiate connections (or accept in the case of server components) only through that interface. It is recommended to provide an IP address rather than a hostname when setting this property to ensure the desired interface is used.
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 multihomed 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 (MLLPServer Component)
This property includes the Transmission Control Protocol (TCP) port in the local host where the component listens.
Syntax
Default Value
0
Remarks
This property must be set before the component can start listening. If its value is 0, then the TCP/IP subsystem picks a port number at random. The port number can be found by checking the value of this property after the component is listening (i.e., after successfully assigning True to the Listening property).
The service port is not shared among servers so two components cannot be listening on the same port at the same time.
SSLAuthenticateClients Property (MLLPServer Component)
If set to True, the server asks the client(s) for a certificate.
Syntax
Default Value
False
Remarks
This property is used in conjunction with the SSLClientAuthentication event. Please refer to the documentation of the SSLClientAuthentication event for details.
SSLCert Property (MLLPServer Component)
The certificate to be used during Secure Sockets Layer (SSL) negotiation.
Syntax
public Certificate SSLCert { get; set; }
Public Property SSLCert As Certificate
Remarks
This property includes the digital certificate that the component will use during SSL negotiation. Set this property to a valid certificate before starting SSL negotiation. To set a certificate, you may set the Encoded field to the encoded certificate. To select a certificate, use the store and subject fields.
Please refer to the Certificate type for a complete list of fields.SSLEnabled Property (MLLPServer Component)
This property indicates whether Transport Layer Security/Secure Sockets Layer (TLS/SSL) is enabled.
Syntax
Default Value
False
Remarks
This property specifies whether TLS/SSL is enabled in the component. When False (default), the component operates in plaintext mode. When True, TLS/SSL is enabled.
TLS/SSL may also be enabled by setting SSLStartMode. Setting SSLStartMode will automatically update this property value.
This property is not available at design time.
Version Property (MLLPServer Component)
The MLLP version to use.
Syntax
public MLLPServerVersions Version { get; set; }
enum MLLPServerVersions { mvVersion1, mvVersion2 }
Public Property Version As MllpserverVersions
Enum MLLPServerVersions mvVersion1 mvVersion2 End Enum
Default Value
2
Remarks
This property specifies the MLLP version the component should use. Valid values are:
- mvVersion1 (1) - MLLP Version 1
- mvVersion2 (2) - MLLP Version 2 (default)
When using MLLP version 1, there are no acknowledgements, so the AckIn and AckOut events will never fire.
This property is not available at design time.
Config Method (MLLPServer Component)
Sets or retrieves a configuration setting.
Syntax
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.
Disconnect Method (MLLPServer Component)
This method disconnects the specified client.
Syntax
public void Disconnect(string connectionId); Async Version public async Task Disconnect(string connectionId); public async Task Disconnect(string connectionId, CancellationToken cancellationToken);
Public Sub Disconnect(ByVal ConnectionId As String) Async Version Public Sub Disconnect(ByVal ConnectionId As String) As Task Public Sub Disconnect(ByVal ConnectionId As String, cancellationToken As CancellationToken) As Task
Remarks
Calling this method will disconnect the client specified by the ConnectionId parameter.
DoEvents Method (MLLPServer Component)
This method 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.
Interrupt Method (MLLPServer Component)
This method interrupts a synchronous send to the remote host.
Syntax
public void Interrupt(string connectionId); Async Version public async Task Interrupt(string connectionId); public async Task Interrupt(string connectionId, CancellationToken cancellationToken);
Public Sub Interrupt(ByVal ConnectionId As String) Async Version Public Sub Interrupt(ByVal ConnectionId As String) As Task Public Sub Interrupt(ByVal ConnectionId As String, cancellationToken As CancellationToken) As Task
Remarks
This property is called using the Connection Id if you wish to interrupt a connection and stop a file from uploading without disconnecting the client connected to the component. If you use SendFile to upload a file, the component will run synchronously on that Connection Id until it is completed.
Reset Method (MLLPServer Component)
This method will reset 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 (MLLPServer Component)
Send HL7 data to the MLLP client associated with the specified connection Id.
Syntax
public void Send(string connectionId); Async Version public async Task Send(string connectionId); public async Task Send(string connectionId, CancellationToken cancellationToken);
Public Sub Send(ByVal ConnectionId As String) Async Version Public Sub Send(ByVal ConnectionId As String) As Task Public Sub Send(ByVal ConnectionId As String, cancellationToken As CancellationToken) As Task
Remarks
The Send method sends data for the connection specified by ConnectionId to the associated MLLP client.
Before calling this method, specify the data to send by doing one of the following (the component will use the data from the first valid location):
- Set the InputStream field to a stream with HL7 data.
- Set the InputFileName field to the path of a file with HL7 data.
- Set the HL7 data directly to the InputData field.
ConnectionId is the connected client to which the server should Send.
Once the client has received the data, it will respond with an acknowledgement, causing the component's AckIn event to fire.
Sending Data Example
mllpServer.Connections[connectionId].InputData = "HL7Data";
mllpServer.Send(connectionId);
Shutdown Method (MLLPServer Component)
This method shuts down the server.
Syntax
public void Shutdown(); Async Version public async Task Shutdown(); public async Task Shutdown(CancellationToken cancellationToken);
Public Sub Shutdown() Async Version Public Sub Shutdown() As Task Public Sub Shutdown(cancellationToken As CancellationToken) As Task
Remarks
This method shuts down the server. Calling this method is equivalent to calling StopListening and then breaking every client connection by calling Disconnect.
StartListening Method (MLLPServer Component)
This method starts listening for incoming connections.
Syntax
public void StartListening(); Async Version public async Task StartListening(); public async Task StartListening(CancellationToken cancellationToken);
Public Sub StartListening() Async Version Public Sub StartListening() As Task Public Sub StartListening(cancellationToken As CancellationToken) As Task
Remarks
This method begins listening for incoming connections on the port specified by LocalPort. Once listening, events will fire as new clients connect and data are transferred.
To stop listening for new connections, call StopListening. To stop listening for new connections and to disconnect all existing clients, call Shutdown.
StopListening Method (MLLPServer Component)
This method stops listening for new connections.
Syntax
public void StopListening(); Async Version public async Task StopListening(); public async Task StopListening(CancellationToken cancellationToken);
Public Sub StopListening() Async Version Public Sub StopListening() As Task Public Sub StopListening(cancellationToken As CancellationToken) As Task
Remarks
This method stops listening for new connections. After being called, any new connection attempts will be rejected. Calling this method does not disconnect existing connections.
To stop listening and to disconnect all existing clients, call Shutdown instead.
AckIn Event (MLLPServer Component)
Fires immediately after receiving an acknowledgement from a client.
Syntax
public event OnAckInHandler OnAckIn; public delegate void OnAckInHandler(object sender, MLLPServerAckInEventArgs e); public class MLLPServerAckInEventArgs : EventArgs { public string ConnectionId { get; } public bool Accepted { get; } }
Public Event OnAckIn As OnAckInHandler Public Delegate Sub OnAckInHandler(sender As Object, e As MLLPServerAckInEventArgs) Public Class MLLPServerAckInEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String Public ReadOnly Property Accepted As Boolean End Class
Remarks
This event fires immediately after receiving an acknowledgement (positive or negative) from an MLLP client.
The ConnectionId parameter reflects the Id of the connection that the acknowledgement was received on.
The Accepted parameter reflects whether the acknowledgement is positive (ACK - True) or negative (NAK - False).
Anytime a negative acknowledgement is received, the component will report an error with code 670.
AckOut Event (MLLPServer Component)
Fires immediately before sending an acknowledgement to a client.
Syntax
public event OnAckOutHandler OnAckOut; public delegate void OnAckOutHandler(object sender, MLLPServerAckOutEventArgs e); public class MLLPServerAckOutEventArgs : EventArgs { public string ConnectionId { get; } public bool Accept { get; set; } }
Public Event OnAckOut As OnAckOutHandler Public Delegate Sub OnAckOutHandler(sender As Object, e As MLLPServerAckOutEventArgs) Public Class MLLPServerAckOutEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String Public Property Accept As Boolean End Class
Remarks
This event fires immediately before the component sends an acknowledgement to an MLLP client.
ConnectionId is the Id of the connection that will receive the acknowledgement.
The Accept parameter should be set to indicate whether the component should send a positive (ACK - True) or negative (NAK - False) acknowledgement. The default is True.
Connected Event (MLLPServer Component)
This event is fired immediately after a connection completes (or fails).
Syntax
public event OnConnectedHandler OnConnected; public delegate void OnConnectedHandler(object sender, MLLPServerConnectedEventArgs e); public class MLLPServerConnectedEventArgs : EventArgs { public string ConnectionId { get; } public int StatusCode { get; } public string Description { get; } }
Public Event OnConnected As OnConnectedHandler Public Delegate Sub OnConnectedHandler(sender As Object, e As MLLPServerConnectedEventArgs) Public Class MLLPServerConnectedEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String 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 system. Description contains a description of this code. The value of StatusCode is equal to the value of the system error.
Please refer to the Error Codes section for more information.
ConnectionRequest Event (MLLPServer Component)
This event is fired when a request for connection comes from a remote host.
Syntax
public event OnConnectionRequestHandler OnConnectionRequest; public delegate void OnConnectionRequestHandler(object sender, MLLPServerConnectionRequestEventArgs e); public class MLLPServerConnectionRequestEventArgs : EventArgs { public string Address { get; } public int Port { get; } public bool Accept { get; set; } }
Public Event OnConnectionRequest As OnConnectionRequestHandler Public Delegate Sub OnConnectionRequestHandler(sender As Object, e As MLLPServerConnectionRequestEventArgs) Public Class MLLPServerConnectionRequestEventArgs Inherits EventArgs Public ReadOnly Property Address As String Public ReadOnly Property Port As Integer Public Property Accept As Boolean End Class
Remarks
This event indicates an incoming connection. The connection is accepted by default. Address and Port will contain information about the remote host requesting the inbound connection. If you want to refuse it, you can set the Accept parameter to False.
Disconnected Event (MLLPServer Component)
This event is fired when a connection is closed.
Syntax
public event OnDisconnectedHandler OnDisconnected; public delegate void OnDisconnectedHandler(object sender, MLLPServerDisconnectedEventArgs e); public class MLLPServerDisconnectedEventArgs : EventArgs { public string ConnectionId { get; } public int StatusCode { get; } public string Description { get; } }
Public Event OnDisconnected As OnDisconnectedHandler Public Delegate Sub OnDisconnectedHandler(sender As Object, e As MLLPServerDisconnectedEventArgs) Public Class MLLPServerDisconnectedEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String 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 system. Description contains a description of this code. The value of StatusCode is equal to the value of the system error.
Please refer to the Error Codes section for more information.
EndTransfer Event (MLLPServer Component)
Fires after incoming HL7 data finishes transferring.
Syntax
public event OnEndTransferHandler OnEndTransfer; public delegate void OnEndTransferHandler(object sender, MLLPServerEndTransferEventArgs e); public class MLLPServerEndTransferEventArgs : EventArgs { public string ConnectionId { get; } }
Public Event OnEndTransfer As OnEndTransferHandler Public Delegate Sub OnEndTransferHandler(sender As Object, e As MLLPServerEndTransferEventArgs) Public Class MLLPServerEndTransferEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String End Class
Remarks
This event fires after incoming HL7 data finishes transferring, immediately before the AckOut event is fired.
ConnectionId is the Id of the connection on which the data was received.
Error Event (MLLPServer Component)
This event fires information about errors during data delivery.
Syntax
public event OnErrorHandler OnError; public delegate void OnErrorHandler(object sender, MLLPServerErrorEventArgs e); public class MLLPServerErrorEventArgs : EventArgs { public string ConnectionId { get; } public int ErrorCode { get; } public string Description { get; } }
Public Event OnError As OnErrorHandler Public Delegate Sub OnErrorHandler(sender As Object, e As MLLPServerErrorEventArgs) Public Class MLLPServerErrorEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String 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.
ConnectionId indicates the connection for which the error is applicable.
Log Event (MLLPServer Component)
Provides logging information.
Syntax
public event OnLogHandler OnLog; public delegate void OnLogHandler(object sender, MLLPServerLogEventArgs e); public class MLLPServerLogEventArgs : EventArgs { public string ConnectionId { get; } public int LogLevel { get; } public string Message { get; } public string LogType { get; } }
Public Event OnLog As OnLogHandler Public Delegate Sub OnLogHandler(sender As Object, e As MLLPServerLogEventArgs) Public Class MLLPServerLogEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String Public ReadOnly Property LogLevel As Integer Public ReadOnly Property Message As String Public ReadOnly Property LogType As String End Class
Remarks
This event fires when processing messages and provides logging information. The LogLevel configuration setting specifies the level of detail that is logged.
ConnectionId reflects the Id of the connection to which the log message pertains.
LogType specifies the type of log message. Possible values are:
- INFO
- VERBOSE
- DEBUG
LogMessage is the log message.
SSLClientAuthentication Event (MLLPServer Component)
This event is fired when the client presents its credentials to the server.
Syntax
public event OnSSLClientAuthenticationHandler OnSSLClientAuthentication; public delegate void OnSSLClientAuthenticationHandler(object sender, MLLPServerSSLClientAuthenticationEventArgs e); public class MLLPServerSSLClientAuthenticationEventArgs : EventArgs { public string ConnectionId { get; } public string CertEncoded { get; }
public byte[] CertEncodedB { get; } public string CertSubject { get; } public string CertIssuer { get; } public string Status { get; } public bool Accept { get; set; } }
Public Event OnSSLClientAuthentication As OnSSLClientAuthenticationHandler Public Delegate Sub OnSSLClientAuthenticationHandler(sender As Object, e As MLLPServerSSLClientAuthenticationEventArgs) Public Class MLLPServerSSLClientAuthenticationEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String Public ReadOnly Property CertEncoded As String
Public ReadOnly Property CertEncodedB As Byte() Public ReadOnly Property CertSubject As String Public ReadOnly Property CertIssuer As String Public ReadOnly Property Status As String Public Property Accept As Boolean End Class
Remarks
This event enables the server to decide whether or not to continue. The Accept parameter is a recommendation on whether to continue or to close the connection. This is just a suggestion: application software must use its own logic to determine whether or not to continue.
When Accept is False, Status shows why the verification failed (otherwise, Status contains the string "OK").
SSLConnectionRequest Event (MLLPServer Component)
This event fires when a Secure Sockets Layer (SSL) connection is requested.
Syntax
public event OnSSLConnectionRequestHandler OnSSLConnectionRequest; public delegate void OnSSLConnectionRequestHandler(object sender, MLLPServerSSLConnectionRequestEventArgs e); public class MLLPServerSSLConnectionRequestEventArgs : EventArgs { public string ConnectionId { get; } public string SupportedCipherSuites { get; } public string SupportedSignatureAlgs { get; } public int CertStoreType { get; set; } public string CertStore { get; set; } public string CertPassword { get; set; } public string CertSubject { get; set; } }
Public Event OnSSLConnectionRequest As OnSSLConnectionRequestHandler Public Delegate Sub OnSSLConnectionRequestHandler(sender As Object, e As MLLPServerSSLConnectionRequestEventArgs) Public Class MLLPServerSSLConnectionRequestEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String Public ReadOnly Property SupportedCipherSuites As String Public ReadOnly Property SupportedSignatureAlgs As String Public Property CertStoreType As Integer Public Property CertStore As String Public Property CertPassword As String Public Property CertSubject As String End Class
Remarks
This event fires when an SSL connection is requested and SSLProvider is set to Internal. This event provides an opportunity to select an alternative certificate to the connecting client. This event does not fire when SSLProvider is set to Platform.
This event allows the component to be configured to use both RSA and ECDSA certificates depending on the connecting client's capabilities.
ConnectionId is the connection Id of the client requesting the connection.
SupportedCipherSuites is a comma-separated list of cipher suites that the client supports.
SupportedSignatureAlgs is a comma-separated list of certificate signature algorithms that the client supports.
CertStoreType is the store type of the alternate certificate to use for this connection. The component supports both public and private keys in a variety of formats. When the cstAuto value is used, the component will automatically determine the type. This field can take one of the following values:
0 (cstUser - default) | For Windows, this specifies that the certificate store is a certificate store owned by the current user.
Note: This store type is not available in Java. |
1 (cstMachine) | For Windows, this specifies that the certificate store is a machine store.
Note: This store type is not available in Java. |
2 (cstPFXFile) | The certificate store is the name of a PFX (PKCS#12) file containing certificates. |
3 (cstPFXBlob) | The certificate store is a string (binary or Base64-encoded) representing a certificate store in PFX (PKCS#12) format. |
4 (cstJKSFile) | The certificate store is the name of a Java Key Store (JKS) file containing certificates.
Note: This store type is only available in Java. |
5 (cstJKSBlob) | The certificate store is a string (binary or Base64-encoded) representing a certificate store in Java Key Store (JKS) format.
Note: This store type is only available in Java. |
6 (cstPEMKeyFile) | The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate. |
7 (cstPEMKeyBlob) | The certificate store is a string (binary or Base64-encoded) that contains a private key and an optional certificate. |
8 (cstPublicKeyFile) | The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate. |
9 (cstPublicKeyBlob) | The certificate store is a string (binary or Base64-encoded) that contains a PEM- or DER-encoded public key certificate. |
10 (cstSSHPublicKeyBlob) | The certificate store is a string (binary or Base64-encoded) that contains an SSH-style public key. |
11 (cstP7BFile) | The certificate store is the name of a PKCS#7 file containing certificates. |
12 (cstP7BBlob) | The certificate store is a string (binary) representing a certificate store in PKCS#7 format. |
13 (cstSSHPublicKeyFile) | The certificate store is the name of a file that contains an SSH-style public key. |
14 (cstPPKFile) | The certificate store is the name of a file that contains a PPK (PuTTY Private Key). |
15 (cstPPKBlob) | The certificate store is a string (binary) that contains a PPK (PuTTY Private Key). |
16 (cstXMLFile) | The certificate store is the name of a file that contains a certificate in XML format. |
17 (cstXMLBlob) | The certificate store is a string that contains a certificate in XML format. |
18 (cstJWKFile) | The certificate store is the name of a file that contains a JWK (JSON Web Key). |
19 (cstJWKBlob) | The certificate store is a string that contains a JWK (JSON Web Key). |
21 (cstBCFKSFile) | The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store).
Note: This store type is only available in Java and .NET. |
22 (cstBCFKSBlob) | The certificate store is a string (binary or Base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format.
Note: This store type is only available in Java and .NET. |
23 (cstPKCS11) | The certificate is present on a physical security key accessible via a PKCS#11 interface.
To use a security key, the necessary data must first be collected using the CertMgr component. The ListStoreCertificates method may be called after setting CertStoreType to cstPKCS11, CertStorePassword to the PIN, and CertStore to the full path of the PKCS#11 DLL. The certificate information returned in the CertList event's CertEncoded parameter may be saved for later use. When using a certificate, pass the previously saved security key information as the Store and set StorePassword to the PIN. Code Example. SSH Authentication with Security Key:
|
99 (cstAuto) | The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically. |
CertStore is the store name or location of the alternate certificate to use for this connection.
Designations of certificate stores are platform dependent.
The following designations are the most common User and Machine certificate stores in Windows:
MY | A certificate store holding personal certificates with their associated private keys. |
CA | Certifying authority certificates. |
ROOT | Root certificates. |
When the certificate store type is cstPFXFile, this property must be set to the name of the file. When the type is cstPFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).
CertPassword is the password of the certificate store containing the alternate certificate to use for this connection.
CertSubject is the subject of the alternate certificate to use for this connection.
The special value * matches any subject and will select the first certificate in the store. The certificate subject is a comma-separated list of distinguished name fields and values. For instance, "CN=www.server.com, OU=test, C=US, E=support@nsoftware.com". Common fields and their meanings are as follows:
Field | Meaning |
CN | Common Name. This is commonly a hostname like www.server.com. |
O | Organization |
OU | Organizational Unit |
L | Locality |
S | State |
C | Country |
E | Email Address |
If a field value contains a comma, it must be quoted.
SSLStatus Event (MLLPServer Component)
This event is fired to show the progress of the secure connection.
Syntax
public event OnSSLStatusHandler OnSSLStatus; public delegate void OnSSLStatusHandler(object sender, MLLPServerSSLStatusEventArgs e); public class MLLPServerSSLStatusEventArgs : EventArgs { public string ConnectionId { get; } public string Message { get; } }
Public Event OnSSLStatus As OnSSLStatusHandler Public Delegate Sub OnSSLStatusHandler(sender As Object, e As MLLPServerSSLStatusEventArgs) Public Class MLLPServerSSLStatusEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String Public ReadOnly Property Message As String End Class
Remarks
The event is fired for informational and logging purposes only. It is used to track the progress of the connection.
StartTransfer Event (MLLPServer Component)
Fires before incoming HL7 data begins transferring.
Syntax
public event OnStartTransferHandler OnStartTransfer; public delegate void OnStartTransferHandler(object sender, MLLPServerStartTransferEventArgs e); public class MLLPServerStartTransferEventArgs : EventArgs { public string ConnectionId { get; } }
Public Event OnStartTransfer As OnStartTransferHandler Public Delegate Sub OnStartTransferHandler(sender As Object, e As MLLPServerStartTransferEventArgs) Public Class MLLPServerStartTransferEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String End Class
Remarks
This event fires before incoming HL7 data begins transferring.
ConnectionId is the Id of the connection on which data is being received.
Transfer Event (MLLPServer Component)
Fires during incoming data transfer.
Syntax
public event OnTransferHandler OnTransfer; public delegate void OnTransferHandler(object sender, MLLPServerTransferEventArgs e); public class MLLPServerTransferEventArgs : EventArgs { public string ConnectionId { get; } public long BytesTransferred { get; } public string data { get; }
public byte[] dataB { get; } }
Public Event OnTransfer As OnTransferHandler Public Delegate Sub OnTransferHandler(sender As Object, e As MLLPServerTransferEventArgs) Public Class MLLPServerTransferEventArgs Inherits EventArgs Public ReadOnly Property ConnectionId As String Public ReadOnly Property BytesTransferred As Long Public ReadOnly Property data As String
Public ReadOnly Property dataB As Byte() End Class
Remarks
This event fires one or more times while incoming data is being transferred.
The ConnectionId parameter is the Id of the connection on which data is being transferred.
The BytesTransferred parameter reflects the number of bytes transferred since the beginning of the transfer.
The Data parameter contains the portion of the data being delivered currently.
Certificate Type
This is the digital certificate being used.
Remarks
This type describes the current digital certificate. The certificate may be a public or private key. The fields are used to identify or select certificates.
Fields
EffectiveDate
string (read-only)
Default: ""
The date on which this certificate becomes valid. Before this date, it is not valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:
23-Jan-2000 15:00:00.
ExpirationDate
string (read-only)
Default: ""
The date on which the certificate expires. After this date, the certificate will no longer be valid. The date is localized to the system's time zone. The following example illustrates the format of an encoded date:
23-Jan-2001 15:00:00.
ExtendedKeyUsage
string (read-only)
Default: ""
A comma-delimited list of extended key usage identifiers. These are the same as ASN.1 object identifiers (OIDs).
Fingerprint
string (read-only)
Default: ""
The hex-encoded, 16-byte MD5 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.
The following example illustrates the format: bc:2a:72:af:fe:58:17:43:7a:5f:ba:5a:7c:90:f7:02
FingerprintSHA1
string (read-only)
Default: ""
The hex-encoded, 20-byte SHA-1 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.
The following example illustrates the format: 30:7b:fa:38:65:83:ff:da:b4:4e:07:3f:17:b8:a4:ed:80:be:ff:84
FingerprintSHA256
string (read-only)
Default: ""
The hex-encoded, 32-byte SHA-256 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.
The following example illustrates the format: 6a:80:5c:33:a9:43:ea:b0:96:12:8a:64:96:30:ef:4a:8a:96:86:ce:f4:c7:be:10:24:8e:2b:60:9e:f3:59:53
Issuer
string (read-only)
Default: ""
The issuer of the certificate. This field contains a string representation of the name of the issuing authority for the certificate.
PrivateKey
string (read-only)
Default: ""
The private key of the certificate (if available). The key is provided as PEM/Base64-encoded data.
Note: The PrivateKey may be available but not exportable. In this case, PrivateKey returns an empty string.
PrivateKeyAvailable
bool (read-only)
Default: False
Whether a PrivateKey is available for the selected certificate. If PrivateKeyAvailable is True, the certificate may be used for authentication purposes (e.g., server authentication).
PrivateKeyContainer
string (read-only)
Default: ""
The name of the PrivateKey container for the certificate (if available). This functionality is available only on Windows platforms.
PublicKey
string (read-only)
Default: ""
The public key of the certificate. The key is provided as PEM/Base64-encoded data.
PublicKeyAlgorithm
string (read-only)
Default: ""
The textual description of the certificate's public key algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_DH") or an object identifier (OID) string representing the algorithm.
PublicKeyLength
int (read-only)
Default: 0
The length of the certificate's public key (in bits). Common values are 512, 1024, and 2048.
SerialNumber
string (read-only)
Default: ""
The serial number of the certificate encoded as a string. The number is encoded as a series of hexadecimal digits, with each pair representing a byte of the serial number.
SignatureAlgorithm
string (read-only)
Default: ""
The text description of the certificate's signature algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_MD5RSA") or an object identifier (OID) string representing the algorithm.
Store
string
Default: "MY"
The name of the certificate store for the client certificate.
The StoreType field denotes the type of the certificate store specified by Store. If the store is password-protected, specify the password in StorePassword.
Store is used in conjunction with the Subject field to specify client certificates. If Store has a value, and Subject or Encoded is set, a search for a certificate is initiated. Please see the Subject field for details.
Designations of certificate stores are platform dependent.
The following designations are the most common User and Machine certificate stores in Windows:
MY | A certificate store holding personal certificates with their associated private keys. |
CA | Certifying authority certificates. |
ROOT | Root certificates. |
When the certificate store type is cstPFXFile, this property must be set to the name of the file. When the type is cstPFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).
StoreB
byte []
Default: "MY"
The name of the certificate store for the client certificate.
The StoreType field denotes the type of the certificate store specified by Store. If the store is password-protected, specify the password in StorePassword.
Store is used in conjunction with the Subject field to specify client certificates. If Store has a value, and Subject or Encoded is set, a search for a certificate is initiated. Please see the Subject field for details.
Designations of certificate stores are platform dependent.
The following designations are the most common User and Machine certificate stores in Windows:
MY | A certificate store holding personal certificates with their associated private keys. |
CA | Certifying authority certificates. |
ROOT | Root certificates. |
When the certificate store type is cstPFXFile, this property must be set to the name of the file. When the type is cstPFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).
StorePassword
string
Default: ""
If the type of certificate store requires a password, this field is used to specify the password needed to open the certificate store.
StoreType
CertStoreTypes
Default: 0
The type of certificate store for this certificate.
The component supports both public and private keys in a variety of formats. When the cstAuto value is used, the component will automatically determine the type. This field can take one of the following values:
0 (cstUser - default) | For Windows, this specifies that the certificate store is a certificate store owned by the current user.
Note: This store type is not available in Java. |
1 (cstMachine) | For Windows, this specifies that the certificate store is a machine store.
Note: This store type is not available in Java. |
2 (cstPFXFile) | The certificate store is the name of a PFX (PKCS#12) file containing certificates. |
3 (cstPFXBlob) | The certificate store is a string (binary or Base64-encoded) representing a certificate store in PFX (PKCS#12) format. |
4 (cstJKSFile) | The certificate store is the name of a Java Key Store (JKS) file containing certificates.
Note: This store type is only available in Java. |
5 (cstJKSBlob) | The certificate store is a string (binary or Base64-encoded) representing a certificate store in Java Key Store (JKS) format.
Note: This store type is only available in Java. |
6 (cstPEMKeyFile) | The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate. |
7 (cstPEMKeyBlob) | The certificate store is a string (binary or Base64-encoded) that contains a private key and an optional certificate. |
8 (cstPublicKeyFile) | The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate. |
9 (cstPublicKeyBlob) | The certificate store is a string (binary or Base64-encoded) that contains a PEM- or DER-encoded public key certificate. |
10 (cstSSHPublicKeyBlob) | The certificate store is a string (binary or Base64-encoded) that contains an SSH-style public key. |
11 (cstP7BFile) | The certificate store is the name of a PKCS#7 file containing certificates. |
12 (cstP7BBlob) | The certificate store is a string (binary) representing a certificate store in PKCS#7 format. |
13 (cstSSHPublicKeyFile) | The certificate store is the name of a file that contains an SSH-style public key. |
14 (cstPPKFile) | The certificate store is the name of a file that contains a PPK (PuTTY Private Key). |
15 (cstPPKBlob) | The certificate store is a string (binary) that contains a PPK (PuTTY Private Key). |
16 (cstXMLFile) | The certificate store is the name of a file that contains a certificate in XML format. |
17 (cstXMLBlob) | The certificate store is a string that contains a certificate in XML format. |
18 (cstJWKFile) | The certificate store is the name of a file that contains a JWK (JSON Web Key). |
19 (cstJWKBlob) | The certificate store is a string that contains a JWK (JSON Web Key). |
21 (cstBCFKSFile) | The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store).
Note: This store type is only available in Java and .NET. |
22 (cstBCFKSBlob) | The certificate store is a string (binary or Base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format.
Note: This store type is only available in Java and .NET. |
23 (cstPKCS11) | The certificate is present on a physical security key accessible via a PKCS#11 interface.
To use a security key, the necessary data must first be collected using the CertMgr component. The ListStoreCertificates method may be called after setting CertStoreType to cstPKCS11, CertStorePassword to the PIN, and CertStore to the full path of the PKCS#11 DLL. The certificate information returned in the CertList event's CertEncoded parameter may be saved for later use. When using a certificate, pass the previously saved security key information as the Store and set StorePassword to the PIN. Code Example. SSH Authentication with Security Key:
|
99 (cstAuto) | The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically. |
SubjectAltNames
string (read-only)
Default: ""
Comma-separated lists of alternative subject names for the certificate.
ThumbprintMD5
string (read-only)
Default: ""
The MD5 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.
ThumbprintSHA1
string (read-only)
Default: ""
The SHA-1 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.
ThumbprintSHA256
string (read-only)
Default: ""
The SHA-256 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.
Usage
string (read-only)
Default: ""
The text description of UsageFlags.
This value will be one or more of the following strings and will be separated by commas:
- Digital Signature
- Non-Repudiation
- Key Encipherment
- Data Encipherment
- Key Agreement
- Certificate Signing
- CRL Signing
- Encipher Only
If the provider is OpenSSL, the value is a comma-separated list of X.509 certificate extension names.
UsageFlags
int (read-only)
Default: 0
The flags that show intended use for the certificate. The value of UsageFlags is a combination of the following flags:
0x80 | Digital Signature |
0x40 | Non-Repudiation |
0x20 | Key Encipherment |
0x10 | Data Encipherment |
0x08 | Key Agreement |
0x04 | Certificate Signing |
0x02 | CRL Signing |
0x01 | Encipher Only |
Please see the Usage field for a text representation of UsageFlags.
This functionality currently is not available when the provider is OpenSSL.
Version
string (read-only)
Default: ""
The certificate's version number. The possible values are the strings "V1", "V2", and "V3".
Subject
string
Default: ""
The subject of the certificate used for client authentication.
This field will be populated with the full subject of the loaded certificate. When loading a certificate, the subject is used to locate the certificate in the store.
If an exact match is not found, the store is searched for subjects containing the value of the property.
If a match is still not found, the property is set to an empty string, and no certificate is selected.
The special value "*" picks a random certificate in the certificate store.
The certificate subject is a comma-separated list of distinguished name fields and values. For instance, "CN=www.server.com, OU=test, C=US, E=support@nsoftware.com". Common fields and their meanings are as follows:
Field | Meaning |
CN | Common Name. This is commonly a hostname like www.server.com. |
O | Organization |
OU | Organizational Unit |
L | Locality |
S | State |
C | Country |
E | Email Address |
If a field value contains a comma, it must be quoted.
Encoded
string
Default: ""
The certificate (PEM/Base64 encoded). This field is used to assign a specific certificate. The Store and Subject fields also may be used to specify a certificate.
When Encoded is set, a search is initiated in the current Store for the private key of the certificate. If the key is found, Subject is updated to reflect the full subject of the selected certificate; otherwise, Subject is set to an empty string.
EncodedB
byte []
Default: ""
The certificate (PEM/Base64 encoded). This field is used to assign a specific certificate. The Store and Subject fields also may be used to specify a certificate.
When Encoded is set, a search is initiated in the current Store for the private key of the certificate. If the key is found, Subject is updated to reflect the full subject of the selected certificate; otherwise, Subject is set to an empty string.
Constructors
public Certificate();
Public Certificate()
Creates a instance whose properties can be set. This is useful for use with when generating new certificates.
public Certificate(string certificateFile);
Public Certificate(ByVal CertificateFile As String)
Opens CertificateFile and reads out the contents as an X.509 public key.
public Certificate(byte[] encoded);
Public Certificate(ByVal Encoded As Byte())
Parses Encoded as an X.509 public key.
public Certificate(CertStoreTypes storeType, string store, string storePassword, string subject);
Public Certificate(ByVal StoreType As CertStoreTypes, ByVal Store As String, ByVal StorePassword As String, ByVal Subject As String)
StoreType identifies the type of certificate store to use. See for descriptions of the different certificate stores. Store is a file containing the certificate store. StorePassword is the password used to protect the store.
After the store has been successfully opened, the component will attempt to find the certificate identified by Subject . This can be either a complete or a substring match of the X.509 certificate's subject Distinguished Name (DN). The Subject parameter can also take an MD5, SHA-1, or SHA-256 thumbprint of the certificate to load in a "Thumbprint=value" format.
public Certificate(CertStoreTypes storeType, string store, string storePassword, string subject, string configurationString);
Public Certificate(ByVal StoreType As CertStoreTypes, ByVal Store As String, ByVal StorePassword As String, ByVal Subject As String, ByVal ConfigurationString As String)
StoreType identifies the type of certificate store to use. See for descriptions of the different certificate stores. Store is a file containing the certificate store. StorePassword is the password used to protect the store.
ConfigurationString is a newline-separated list of name-value pairs that may be used to modify the default behavior. Possible values include "PersistPFXKey", which shows whether or not the PFX key is persisted after performing operations with the private key. This correlates to the PKCS12_NO_PERSIST_KEY CryptoAPI option. The default value is True (the key is persisted). "Thumbprint" - an MD5, SHA-1, or SHA-256 thumbprint of the certificate to load. When specified, this value is used to select the certificate in the store. This is applicable to the cstUser , cstMachine , cstPublicKeyFile , and cstPFXFile store types. "UseInternalSecurityAPI" shows whether the platform (default) or the internal security API is used when performing certificate-related operations.
After the store has been successfully opened, the component will attempt to find the certificate identified by Subject . This can be either a complete or a substring match of the X.509 certificate's subject Distinguished Name (DN). The Subject parameter can also take an MD5, SHA-1, or SHA-256 thumbprint of the certificate to load in a "Thumbprint=value" format.
public Certificate(CertStoreTypes storeType, string store, string storePassword, byte[] encoded);
Public Certificate(ByVal StoreType As CertStoreTypes, ByVal Store As String, ByVal StorePassword As String, ByVal Encoded As Byte())
StoreType identifies the type of certificate store to use. See for descriptions of the different certificate stores. Store is a file containing the certificate store. StorePassword is the password used to protect the store.
After the store has been successfully opened, the component will load Encoded as an X.509 certificate and search the opened store for a corresponding private key.
public Certificate(CertStoreTypes storeType, byte[] store, string storePassword, string subject);
Public Certificate(ByVal StoreType As CertStoreTypes, ByVal Store As Byte(), ByVal StorePassword As String, ByVal Subject As String)
StoreType identifies the type of certificate store to use. See for descriptions of the different certificate stores. Store is a byte array containing the certificate data. StorePassword is the password used to protect the store.
After the store has been successfully opened, the component will attempt to find the certificate identified by Subject . This can be either a complete or a substring match of the X.509 certificate's subject Distinguished Name (DN). The Subject parameter can also take an MD5, SHA-1, or SHA-256 thumbprint of the certificate to load in a "Thumbprint=value" format.
public Certificate(CertStoreTypes storeType, byte[] store, string storePassword, string subject, string configurationString);
Public Certificate(ByVal StoreType As CertStoreTypes, ByVal Store As Byte(), ByVal StorePassword As String, ByVal Subject As String, ByVal ConfigurationString As String)
StoreType identifies the type of certificate store to use. See for descriptions of the different certificate stores. Store is a byte array containing the certificate data. StorePassword is the password used to protect the store.
After the store has been successfully opened, the component will attempt to find the certificate identified by Subject . This can be either a complete or a substring match of the X.509 certificate's subject Distinguished Name (DN). The Subject parameter can also take an MD5, SHA-1, or SHA-256 thumbprint of the certificate to load in a "Thumbprint=value" format.
public Certificate(CertStoreTypes storeType, byte[] store, string storePassword, byte[] encoded);
Public Certificate(ByVal StoreType As CertStoreTypes, ByVal Store As Byte(), ByVal StorePassword As String, ByVal Encoded As Byte())
StoreType identifies the type of certificate store to use. See for descriptions of the different certificate stores. Store is a byte array containing the certificate data. StorePassword is the password used to protect the store.
After the store has been successfully opened, the component will load Encoded as an X.509 certificate and search the opened store for a corresponding private key.
MLLPConnection Type
An MLLP client connection.
Remarks
This type represents an MLLP client connection.
Fields
Connected
bool (read-only)
Default: False
Triggers a connection or disconnection.
This field triggers a connection or disconnection.
Setting this field to True initiates a connection attempt to the host specified by the RemoteHost field. If successful, the value of this field changes to True and the Connected event is fired.
ConnectionId
string (read-only)
Default: ""
The Id of the connection.
This field contains an identifier generated by the component that uniquely identifies the connection.
InputData
string
Default: ""
The raw HL7 data to send.
This field is used to specify the HL7 data to send when the Send method is called.
Note that the component checks the following places for input data, in order, when Send is called. Input data is sent from the first place it is found:
- A stream specified using the connection's InputStream field.
- The contents of a file whose path has been set to the connection's InputFileName property.
- The data set to the connection's InputData property.
InputDataB
byte []
Default: ""
The raw HL7 data to send.
This field is used to specify the HL7 data to send when the Send method is called.
Note that the component checks the following places for input data, in order, when Send is called. Input data is sent from the first place it is found:
- A stream specified using the connection's InputStream field.
- The contents of a file whose path has been set to the connection's InputFileName property.
- The data set to the connection's InputData property.
InputFileName
string
Default: ""
The path of a file containing HL7 data to send.
This field is used to specify a path to a file whose contents will be sent when the Send method is called.
Note that the component checks the following places for input data, in order, when Send is called. Input data is sent from the first place it is found:
- A stream specified using the connection's InputStream field.
- The contents of a file whose path has been set to the connection's InputFileName property.
- The data set to the connection's InputData property.
InputStream
System.IO.Stream
Default: ""
A stream containing HL7 data to send.
This field is used to specify a stream containing HL7 data to send when the Send method is called.
Note that the component checks the following places for input data, in order, when Send is called. Input data is sent from the first place it is found:
- A stream specified using the connection's InputStream field.
- The contents of a file whose path has been set to the connection's InputFileName property.
- The data set to the connection's InputData property.
LocalAddress
string (read-only)
Default: ""
The address of the local interface through which the connection is passing.
This field reflects the address of the local network interface through which the connection is passing. This information is typically only important for multi-homed devices.
OutputData
string (read-only)
Default: ""
The raw HL7 data received.
This field holds the raw HL7 data received from the MLLP client.
Note that the component will store output data in one of the following places, choosing the first one that is valid:
- A stream specified using the connection's OutputStream field.
- A file whose path has been set to the connection's OutputFileName field.
- The connection's OutputData field.
OutputDataB
byte [] (read-only)
Default: ""
The raw HL7 data received.
This field holds the raw HL7 data received from the MLLP client.
Note that the component will store output data in one of the following places, choosing the first one that is valid:
- A stream specified using the connection's OutputStream field.
- A file whose path has been set to the connection's OutputFileName field.
- The connection's OutputData field.
OutputFileName
string
Default: ""
The path of a file in which to store received HL7 data.
This field is used to specify a path to a file in which to store HL7 data received from the MLLP client.
Note that the component will store output data in one of the following places, choosing the first one that is valid:
- A stream specified using the connection's OutputStream field.
- A file whose path has been set to the connection's OutputFileName field.
- The connection's OutputData field.
OutputStream
System.IO.Stream
Default: ""
A stream to which received HL7 data should be written.
This field is used to specify a stream to which HL7 data received from the MLLP client should be written.
Note that the component will store output data in one of the following places, choosing the first one that is valid:
- A stream specified using the connection's OutputStream field.
- A file whose path has been set to the connection's OutputFileName field.
- The connection's OutputData field.
RemoteHost
string (read-only)
Default: ""
The address of the MLLP client associated with the connection.
This field reflects the address of the MLLP client associated with the connection.
RemotePort
int (read-only)
Default: 0
The port of the MLLP client associated with the connection.
This field reflects the port of the MLLP client associated with the connection.
Timeout
int
Default: 0
The timeout value, in seconds, for the connection.
This field specifies the timeout, in seconds, to use for the connection.
If set to 0, all operations return immediately, potentially failing with a WOULDBLOCK error if data can't be sent immediately.
If set to a positive value, the component will automatically retry each operation that would otherwise result in a WOULDBLOCK error 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.
Note: By default, all timeouts are inactivity timeouts, that is, the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.
The default value is 0 (asynchronous operation).
Constructors
public MLLPConnection();
Public MLLPConnection()
Config Settings (MLLPServer 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.MLLPServer Config Settings
0 (None) | No events are logged. |
1 (Info - default) | Informational events are logged. |
2 (Verbose) | Detailed data is logged. |
3 (Debug) | Debug data is logged. |
If the component considers a transmission to have timed out, it will ignore all data received until the next StartBlockChar is received.
TCPClient Config Settings
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.
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.
Note: This setting is provided for use by components that do not directly expose Firewall properties.
Note: This configuration setting is provided for use by components that do not directly expose Firewall properties.
0 | No firewall (default setting). |
1 | Connect through a tunneling proxy. FirewallPort is set to 80. |
2 | Connect through a SOCKS4 Proxy. FirewallPort is set to 1080. |
3 | Connect through a SOCKS5 Proxy. FirewallPort is set to 1080. |
10 | Connect 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.
Note: This setting is provided for use by components that do not directly expose Firewall properties.
Note: This value is not applicable in macOS.
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.
In multihomed 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 multihomed hosts (machines with more than one IP interface).
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 configuration setting is useful when trying to connect to services that require a trusted port on the client side. An example is the remote shell (rsh) service in UNIX systems.
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.
www.google.com;www.nsoftware.com
Note: This value is not applicable in Java.
By default, this configuration setting is set to False.
0 | IPv4 only |
1 | IPv6 only |
2 | IPv6 with IPv4 fallback |
SSL Config Settings
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 as follows:
/etc/ssl/ca-bundle.pem;/etc/pki/tls/certs/ca-bundle.crt;/etc/ssl/certs/ca-certificates.crt;/etc/pki/tls/cacert.pem
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 configuration setting has no effect if SSLProvider is set to Platform.
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.
-----BEGIN CERTIFICATE----- MIIEKzCCAxOgAwIBAgIRANTET4LIkxdH6P+CFIiHvTowDQYJKoZIhvcNAQELBQAw ... Intermediate Cert ... eWHV5OW1K53o/atv59sOiW5K3crjFhsBOd5Q+cJJnU+SWinPKtANXMht+EDvYY2w F0I1XhM+pKj7FjDr+XNj -----END CERTIFICATE----- \r \n -----BEGIN CERTIFICATE----- MIIEFjCCAv6gAwIBAgIQetu1SMxpnENAnnOz1P+PtTANBgkqhkiG9w0BAQUFADBp ... Root Cert ... d8q23djXZbVYiIfE9ebr4g3152BlVCHZ2GyPdjhIuLeH21VbT/dyEHHA -----END CERTIFICATE-----
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 it 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 supported only in the Java, C#, and C++ editions. In the C++ edition, it is supported only on Windows operating systems.
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 it 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 supported only in the Java, C#, and C++ editions. In the C++ edition, it is supported only on Windows operating systems.
Note: This configuration 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 configuration 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 configuration setting.
The value of this configuration setting is a newline-separated (CR/LF) list of certificates. For instance:
-----BEGIN CERTIFICATE----- MIIEKzCCAxOgAwIBAgIRANTET4LIkxdH6P+CFIiHvTowDQYJKoZIhvcNAQELBQAw ... Intermediate Cert ... eWHV5OW1K53o/atv59sOiW5K3crjFhsBOd5Q+cJJnU+SWinPKtANXMht+EDvYY2w F0I1XhM+pKj7FjDr+XNj -----END CERTIFICATE----- \r \n -----BEGIN CERTIFICATE----- MIIEFjCCAv6gAwIBAgIQetu1SMxpnENAnnOz1P+PtTANBgkqhkiG9w0BAQUFADBp ... Root Cert ... d8q23djXZbVYiIfE9ebr4g3152BlVCHZ2GyPdjhIuLeH21VbT/dyEHHA -----END CERTIFICATE-----
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 include the following:
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 the following:
- 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
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_ECDH_RSA_WITH_AES_128_CBC_SHA");
Possible values when SSLProvider is set to Internal include the following:
- 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_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.
Not all supported protocols are enabled by default. The default value is 4032 for client components, and 3072 for server components. To specify a combination of enabled protocol versions set this config to the binary OR of one or more of the following values:
TLS1.3 | 12288 (Hex 3000) |
TLS1.2 | 3072 (Hex C00) (Default - Client and Server) |
TLS1.1 | 768 (Hex 300) (Default - Client) |
TLS1 | 192 (Hex C0) (Default - Client) |
SSL3 | 48 (Hex 30) |
SSL2 | 12 (Hex 0C) |
Note that only TLS 1.2 is enabled for server components that accept incoming connections. This adheres to industry standards to ensure a secure connection. Client components enable TLS 1.0, TLS 1.1, and TLS 1.2 by default and will negotiate the highest mutually supported version when connecting to a server, which should be TLS 1.2 in most cases.
SSLEnabledProtocols: Transport Layer Security (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 that 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 supported only 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 available only 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, these 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.
SSLEnabledProtocols: SSL2 and SSL3 Notes:
SSL 2.0 and 3.0 are not supported by the component when the SSLProvider is set to internal. To use SSL 2.0 or SSL 3.0, the platform security API must have the protocols enabled and SSLProvider needs to be set to platform.
This configuration setting is applicable only when SSLProvider is set to Internal.
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.
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 traffic for debugging purposes. When writing to this file, the component will only append, it will not overwrite previous values.
Note: This configuration setting is applicable only when SSLProvider is set to Internal.
Note: For server components (e.g., TCPServer), this is a per-connection configuration setting accessed by passing the ConnectionId. For example:
server.Config("SSLNegotiatedCipher[connId]");
Note: For server components (e.g., TCPServer), this is a per-connection configuration setting accessed by passing the ConnectionId. For example:
server.Config("SSLNegotiatedCipherStrength[connId]");
Note: For server components (e.g., TCPServer), this is a per-connection configuration setting accessed by passing the ConnectionId. For example:
server.Config("SSLNegotiatedCipherSuite[connId]");
Note: For server components (e.g., TCPServer), this is a per-connection configuration setting accessed by passing the ConnectionId. For example:
server.Config("SSLNegotiatedKeyExchange[connId]");
Note: For server components (e.g., TCPServer), this is a per-connection configuration setting accessed by passing the ConnectionId. For example:
server.Config("SSLNegotiatedKeyExchangeStrength[connId]");
Note: For server components (e.g., TCPServer), this is a per-connection configuration setting accessed by passing the ConnectionId. For example:
server.Config("SSLNegotiatedVersion[connId]");
0x00000001 | Ignore time validity status of certificate. |
0x00000002 | Ignore time validity status of CTL. |
0x00000004 | Ignore non-nested certificate times. |
0x00000010 | Allow unknown certificate authority. |
0x00000020 | Ignore wrong certificate usage. |
0x00000100 | Ignore unknown certificate revocation status. |
0x00000200 | Ignore unknown CTL signer revocation status. |
0x00000400 | Ignore unknown certificate authority revocation status. |
0x00000800 | Ignore unknown root revocation status. |
0x00008000 | Allow test root certificate. |
0x00004000 | Trust test root certificate. |
0x80000000 | Ignore non-matching CN (certificate CN non-matching server name). |
This functionality is currently not available in Java or when the provider is OpenSSL.
The value of this configuration setting is a newline-separated (CR/LF) list of certificates. For instance:
-----BEGIN CERTIFICATE----- MIIEKzCCAxOgAwIBAgIRANTET4LIkxdH6P+CFIiHvTowDQYJKoZIhvcNAQELBQAw ... Intermediate Cert... eWHV5OW1K53o/atv59sOiW5K3crjFhsBOd5Q+cJJnU+SWinPKtANXMht+EDvYY2w F0I1XhM+pKj7FjDr+XNj -----END CERTIFICATE----- \r \n -----BEGIN CERTIFICATE----- MIIEFjCCAv6gAwIBAgIQetu1SMxpnENAnnOz1P+PtTANBgkqhkiG9w0BAQUFADBp ... Root Cert... d8q23djXZbVYiIfE9ebr4g3152BlVCHZ2GyPdjhIuLeH21VbT/dyEHHA -----END CERTIFICATE-----
When specified the component will verify that the server certificate signature algorithm is among the values specified in this configuration 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 configuration 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.
To not restrict the server's certificate signature algorithm, specify an empty string as the value for this configuration setting, which will cause the signature_algorithms TLS 1.2 extension to not be sent.
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)
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 configuration setting.
Note: All supported groups can always be used during the handshake even if not listed here, but if a group is used that is not present in this list, it will incur an additional roundtrip and time to generate the key share for that group.
In most cases, this configuration setting does not need to be modified. This should be modified only 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"
- "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 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
Note: This option is not valid for User Datagram Protocol (UDP) ports.
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.
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
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.
- 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.
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.
FIPS mode can be enabled by setting the UseFIPSCompliantAPI configuration setting to true. This is a static setting that applies to all instances of all components of the toolkit within the process. It is recommended to enable or disable this setting once before the component has been used to establish a connection. Enabling FIPS while an instance of the component is active and connected may result in unexpected behavior.
For more details, please see the FIPS 140-2 Compliance article.
Note: This setting is applicable only on Windows.
Note: Enabling FIPS compliance requires a special license; please contact sales@nsoftware.com for details.
Setting this configuration 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 dynamic link library (DLL) is no longer required as a reference, as all unmanaged code is stored in that file.
Trappable Errors (MLLPServer Component)
MLLPServer Errors
670 | Received a negative acknowledgement. The other party received the message but could not commit the HL7 content to storage. |
671 | Data was invalid. A timeout occurred or the message block was improperly formatted. |
672 | Connection interrupted. A party disconnected while transferring data and the file stream had to be forcibly closed. |
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. |
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 nonsocket. |
10039 | [10039] Destination address required. |
10040 | [10040] Message is too long. |
10041 | [10041] Protocol wrong type for socket. |
10042 | [10042] Bad protocol option. |
10043 | [10043] Protocol is not supported. |
10044 | [10044] Socket type is not supported. |
10045 | [10045] Operation is not supported on socket. |
10046 | [10046] Protocol family is not supported. |
10047 | [10047] Address family is not supported by protocol family. |
10048 | [10048] Address already in use. |
10049 | [10049] Cannot 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] Cannot send after socket shutdown. |
10059 | [10059] Too many references, cannot splice. |
10060 | [10060] Connection timed out. |
10061 | [10061] Connection refused. |
10062 | [10062] Too many levels of symbolic links. |
10063 | [10063] File name is too long. |
10064 | [10064] Host is down. |
10065 | [10065] No route to host. |
10066 | [10066] Directory is 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 is not loaded yet. |
11001 | [11001] Host not found. |
11002 | [11002] Nonauthoritative 'Host not found' (try again or check DNS setup). |
11003 | [11003] Nonrecoverable errors: FORMERR, REFUSED, NOTIMP. |
11004 | [11004] Valid name, no data record (check DNS setup). |