Represents HTTPS stream parameters that define how to communicate with a MobiLink server using secure HTTPS.
The following example sets the stream parameters to communicate with a MobiLink 11 server on host name "MyMLHost". The server started with the following parameters: "-xo https(port=1234;certificate=RSAServer.crt;certificate_password=x)"
SyncParms syncParms = myConnection.createSyncParms( SyncParms.HTTPS, "MyUniqueMLUserID", "MyMLScriptVersion" ); StreamHTTPSParms httpsParms = (StreamHTTPSParms) syncParms.getStreamParms(); httpsParms.setHost("MyMLHost"); httpsParms.setPort(1234);
The above example assumes that the certificate in RSAServer.crt is chained to a trusted root certificate already installed on the client host or device.
For J2SE, you can deploy the required trusted root certificate by using one of the following methods:
1. Install the trusted root certificate in the lib/security/cacerts key store of the JRE.
2. Build your own key store using the Java keytool utility and setting the Java system property javax.net.ssl.trustStore to its location. (set javax.net.ssl.trustStorePassword to an appropriate value)
3. Using the setTrustedCertificates function parameter to point to the deployed certificate file.
To enhance security, the setCertificateName, setCertificateCompany setCertificateUnit methods should be used to turn on validation of the MobiLink server certificate.
Instances implementing this interface are returned by the getStreamParms function when the SyncParms class object is created for HTTPS synchronization.
All members of StreamHTTPSParms, including all inherited members.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|