public class SSLRemoteApplication extends RemoteApplication implements X509TrustManager
Note: The SSL connection is not supported for Applets calling this API (i.e. inside a browser). The calling Java code must be run as a Java Application, Servlet, etc.
RemoteApplicationCONNECTION_ALLOWED, EVENT_ERROR, EVENT_INFORMATIONAL, EVENT_WARNING, RAPP_CLOSE, RAPP_GET_REPLY, RAPP_ID_TRANS, RAPP_LOG_EVENT, RAPP_REPLY_DATA, RAPP_REPLY_ERROR, RAPP_REQUEST_ACK, RAPP_REQUEST_DATA, RAPP_REQUEST_NACK, RAPP_STATUS_TRANS, STATUS_ERROR, STATUS_OK, STATUS_REDIRECTION, TRANSACTION_LEVEL| Constructor and Description |
|---|
SSLRemoteApplication(String applicationName)Creates a new instance of the SSL Remote Application class using the specified applicationName without a previous connection (i.e. |
SSLRemoteApplication(String applicationName, String sessionID)Creates a new instance of the SSL Remote Application class using the specified applicationName and a previous sessionID (if non-null). |
| Modifier and Type | Method and Description |
|---|---|
void | checkClientTrusted(X509Certificate[] chain, String authType)Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return if it can be validated and is trusted for client SSL authentication based on the authentication type. |
void | checkServerTrusted(X509Certificate[] chain, String authType)Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return if it can be validated and is trusted for server SSL authentication based on the authentication type. |
protected String | connect(String hostName, int port)Connects to a server over an SSL socket. |
X509Certificate[] | getAcceptedIssuers()Gets an array of certificate authority certificates which are trusted for authenticating peers. |
String | paramString()Gets the parameter string for this class for testing purposes. |
void | setClientCertificate(String certificateFileName, String privateKeyPassword)Sets the client certificate file name to use if the server application in the server requires "client certificates". |
void | setStrongEncryption(boolean doStrongEncryption)Selects 128 bit encryption (true) or not (false). |
close, connect, connect, getReply, getServerHostAddress, getServerPort, getSessionID, hasBlockingReply, inDebugMode, isConnected, isSessionIDReconnectable, logDebugOutput, logServerEvent, requestClose, requestTransaction, setAuthentication, setDebugMode, setServer, setServers, setStaticDebugMode, toStringpublic SSLRemoteApplication(String applicationName)
applicationName without a previous connection (i.e. a sessionID).Use the method setStrongEncryption to select 128 bit encryption (true) or not (false).
Use the method setClientCertificate to define the file name to use if a "client certificate" is used for the application in the server.
Use the calls setServer or setServers to set up the servers to contact.
If user authentication is required, use the method setAuthentication to set it up.
After this has been done, call the connect method to establish a connection.
applicationName - The application name to use.setStrongEncryption(boolean), setClientCertificate(java.lang.String, java.lang.String)public SSLRemoteApplication(String applicationName, String sessionID)
applicationName and a previous sessionID (if non-null).Use the method setStrongEncryption to select 128 bit encryption (true) or not (false), default is strong.
Use the method setClientCertificate to define the file name to use if a "client certificate" is used for the application in the server.
Use the calls setServer or setServers to set up the servers to contact.
If user authentication is required, use the method setAuthentication to set it up.
After this has been done, call the connect method to establish a connection.
applicationName - The application name to use.sessionID - The previously connection session ID or null for none.setStrongEncryption(boolean), setClientCertificate(java.lang.String, java.lang.String)public void setStrongEncryption(boolean doStrongEncryption)
doStrongEncryption - Select true to use 128 bit encryption of false for less.public void setClientCertificate(String certificateFileName, String privateKeyPassword)
certificateFileName - The certificate file name or null for none.privateKeyPassword - The private key password or null for none.protected String connect(String hostName, int port) throws UnknownHostException, IOException
connect in class RemoteApplicationIOException - if an I/O error occurs when creating the socket.UnknownHostException - Thrown to indicate that the IP address of a host could not be determined.public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkClientTrusted in interface X509TrustManagerchain - The peer certificate chain.authType - The authentication type based on the client certificate.CertificateException - Always, a client doesn't connect in our case.public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
The authentication type is the key exchange algorithm portion of the cipher suites represented as a String, such as "RSA", "DHE_DSS". Note: for some exportable cipher suites, the key exchange algorithm is determined at run time during the handshake. For instance, for TLS_RSA_EXPORT_WITH_RC4_40_MD5, the authType should be RSA_EXPORT when an ephemeral RSA key is used for the key exchange, and RSA when the key from the server certificate is used. Checking is case-sensitive.
checkServerTrusted in interface X509TrustManagerchain - The peer certificate chain.authType - The authentication type based on the client certificate.CertificateException - Always, a client doesn't connect in our case.public X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface X509TrustManagerpublic String paramString()
paramString in class RemoteApplicationPhantom® and NetPhantom® are registered trademarks of Mindus SARL.
© 2026 Mindus SARL. All rights reserved.