Class SSLClient


  • public class SSLClient
    extends SSLCTX
    The client context. All client connections are started within a client context.
    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      SSLClient​(int options, int num_sessions)
      Start a new client context.
    • Method Detail

      • connect

        public final SSL connect​(Socket socket,
                                 byte[] session_id)
                          throws IOException,
                                 NoSuchAlgorithmException,
                                 CryptoException
        Establish a new SSL connection to an SSL server. It is up to the application to establish the initial socket connection. This is a blocking call - it will finish when the handshake is complete (or has failed). Call dispose() when the connection is to be removed.
        Parameters:
        socket - [in] A reference to a totalcross.net.Socket.
        session_id - [in] A 32 byte session id for session resumption. This can be null if no session resumption is not required.
        Returns:
        An SSL object reference. Use SSL.handshakeStatus() to check if a handshake succeeded.
        Throws:
        IOException
        CryptoException
        NoSuchAlgorithmException