Package totalcross.net.ssl
Class SSLClient
- java.lang.Object
-
- totalcross.net.ssl.SSLCTX
-
- totalcross.net.ssl.SSLClient
-
public class SSLClient extends SSLCTX
The client context. All client connections are started within a client context.
-
-
Constructor Summary
Constructors Constructor Description SSLClient(int options, int num_sessions)Start a new client context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSLconnect(Socket socket, byte[] session_id)Establish a new SSL connection to an SSL server.
-
-
-
Constructor Detail
-
SSLClient
public SSLClient(int options, int num_sessions) throws NoSuchAlgorithmExceptionStart a new client context.- Throws:
NoSuchAlgorithmException- See Also:
for details.
-
-
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:
IOExceptionCryptoExceptionNoSuchAlgorithmException
-
-