AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SSL no cipher suites in common?

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Security and Java
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Sun Nov 12, 2006 12:37 am    Post subject: SSL no cipher suites in common? Reply with quote



I'm trying to establish TLS over an existing socket, both the server
and client are running on the same machine with the same jre, but I
keep getting a "SSLHandshakeException: no cipher suites in common.", so
I was wondering how that's even possible.

Here is the server:

SSLContext context = SSLContext.getInstance("TLS");

context.init(null, new javax.net.ssl.TrustManager[]{
new OpenTrustManager()},
new java.security.SecureRandom());

Socket plain = socket;
// Secure the plain connection
socket = context.getSocketFactory().createSocket(plain,
plain.getInetAddress().toString(), plain.getPort(), true);
socket.setSoTimeout(0);
socket.setKeepAlive(true);
((SSLSocket) socket).setEnableSessionCreation(true);
((SSLSocket) socket).setUseClientMode(false);
((SSLSocket) socket).setNeedClientAuth(false);

//enable all available cipher suites
((SSLSocket)
socket).setEnabledCipherSuites(context.getSocketFactory().getSupportedCipherSuites());

((SSLSocket) socket).startHandshake(); //SSLHandshakeException: no
cipher suites in common
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Security and Java All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.