• Post Reply Bookmark Topic Watch Topic
  • New Topic

Abnormal server socket condition

 
bandlapalli reddy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got the bello error
Abnormal server socket condition:javax.net.ssl.SSLException: No available certificate corresponds to the SSL cipher suites which are enabled.
import javax.net.ssl.*;
import java.io.*;
import java.security.*;
/**
* @author leelananda
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class SecureServer {

SSLServerSocket ssocket;
SSLSocket clientSocket;
DataInputStream input;
public SecureServer() {
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
try {
SSLServerSocketFactory sslSrvFact =
(SSLServerSocketFactory)SSLServerSocketFactory.getDefault();

ssocket = (SSLServerSocket)sslSrvFact.createServerSocket(8123);
System.out.println("Port Allocketed for Socket");
clientSocket = (SSLSocket)ssocket.accept() ; // accept 1 client.
System.out.println("Allocated new server");
while(true) {
System.out.println("Abnormal server socket condition: 00000");
input = new DataInputStream( clientSocket.getInputStream() );
System.out.println("Abnormal server socket condition:111 ");
String s = new String( input.readLine() );
System.out.println(s);
}
} catch(IOException e) {
System.out.println("Abnormal server socket condition: "+ e );
}
}
public static void main(String[] args) {
new SecureServer();
}
}
can any please rectify my problem
thank you & Regards
Leelananda
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!