}
public void testSocketCreation() throws Throwable {
SSLSocketFactory socketFactory
= new SSLSocketFactoryImpl(JSSETestData.getSSLParameters());
SSLServerSocketFactory serverSocketFactory
= new SSLServerSocketFactoryImpl(JSSETestData.getSSLParameters());
String[] enabled = {"TLS_RSA_WITH_RC4_128_MD5"};
for (int i=0; i<4; i++) {
SSLServerSocket ssocket;
switch (i) {
case 0:
if (doLog) {
System.out.println(
"*** ServerSocketFactory.createServerSocket()");
}
ssocket = (SSLServerSocket)
serverSocketFactory.createServerSocket();
ssocket.bind(null);
break;
case 1:
if (doLog) {
System.out.println(
"*** ServerSocketFactory.createServerSocket(int)");
}
ssocket = (SSLServerSocket)
serverSocketFactory.createServerSocket(0);
break;
case 2:
if (doLog) {
System.out.println(
"*** ServerSocketFactory.createServerSocket(int,int)");
}
ssocket = (SSLServerSocket)
serverSocketFactory.createServerSocket(0, 6);
break;
default:
if (doLog) {
System.out.println("*** ServerSocketFactory."
+ "createServerSocket(int,int,InetAddress)");
}
ssocket = (SSLServerSocket)
serverSocketFactory.createServerSocket(0, 6, null);
break;
}
ssocket.setUseClientMode(false);
ssocket.setEnabledCipherSuites(enabled);
for (int j=0; j<6; j++) {