[security-dev 00426]: Re: NullPointerException at sun.security.ssl.OutputRecord.writeBuffer

Brad Wetmore Bradford.Wetmore at Sun.COM
Sun Nov 23 16:56:19 UTC 2008


>> // Create and initialize a SSLContext, from which you obtain a
>> // SSLSocketFactory, sslssf
>>
>> ServerSocket ss = new ServerSocket(port);
>> Socket s = ss.accept();

SSLSocket sslSocket = slssf.createSocket(s,
     s.getInetAddress().getHostName(), s.getPort(), false);
sslSocket.setUseClientMode(false);

This configures the socket to play the role of a server in the handshakes.

Brad



More information about the security-dev mailing list