Help Center

Local Navigation

Use an HTTPS connection

If your BlackBerry device is associated with a BlackBerry® Enterprise Server and uses an HTTPS proxy server that requires authentication, you will not be able to use end-to-end TLS.

  1. Import the following classes:
    • net.rim.device.api.system.CoverageInfo
    • javax.microedition.io.Connector
  2. Import the following interfaces:
    • net.rim.device.api.system.CoverageStatusListener
    • javax.microedition.io.HttpsConnection
  3. Use the CoverageInfo class and CoverageStatusListener interface of the net.rim.device.api.system package to make sure that the BlackBerry device is in a wireless network coverage area.
  4. Invoke Connector.open(), specifying HTTPS as the protocol and cast the returned object as an HttpsConnection object to open an HTTP connection.
    HttpsConnection stream = (HttpsConnection)Connector.open("https://host:443/");
  5. To specify the connection mode, add one of the following parameters to the connection string that passes to Connector.open()
    • Specify that an end-to-end HTTPS connection must be used from the BlackBerry device to the target server: EndToEndRequired
    • Specify that an end-to-end HTTPS connection should be used from the BlackBerry device to the target server. If the BlackBerry device does not support end-to-end TLS, and the BlackBerry device user permits proxy TLS connections, then a proxy connection is used: EndToEndDesired.
    HttpsConnection stream = (HttpsConnection)Connector.open("https://host:443/;EndToEndDesired");
Previous topic: Use HTTP authentication

Was this information helpful? Send us your comments.