SSL Socket Server : SSL Socket « Security « Java Tutorial


public class MainClass {

  private static final int PORT = 8080;

  public static void main(String[] args) throws Exception {

    SSLServerSocketFactory ssf = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
    ServerSocket ss = ssf.createServerSocket(PORT);
    Socket s = ss.accept();
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    String line = null;
    while (((line = in.readLine()) != null)) {

36.44.SSL Socket
36.44.1.Use SSLServerSocketFactory to create a SSL Server
36.44.2.SSL Server Session
36.44.3.SSL Client Session
36.44.4.Send html(gif) file through SSLSocket
36.44.5.SSL Client Demo
36.44.6.SSL Client with setting
36.44.7.SSL Socket Server
36.44.8.SSL Socket Client
36.44.9.Sun SSL Socket Client
36.44.10.Sun SSL Socket Server
36.44.11.SSL Simple Client
36.44.12.SSL Simple Server
36.44.13.SSL Client Verifier
36.44.14.SSLContext and Key manager
36.44.15.SSL Server with KeyStore and Key Store Password setting
36.44.16.Get peer certificate from SSL session
36.44.17.Retrieving the Certification Path of an SSL Server