Jan 22

To listener for SSL connections you need to use a ServerSocket using the SSLServerSocketFactory cla as shown in the following example.

// Create the listening server socket

ServerSocketFactory serverSocketFactory = 
int port = 443;
ServerSocket ssocket = 
// Listen for SSL connections

Socket socket = ssocket.accept();

// Treat the connection as you would any socket

In addition you will also need to add the certificate (that is sent to the connecting client) to the keystore used by the application.

written by objects \\ tags: , , , ,

Leave a Reply

You must be logged in to post a comment.