I configured my SSLContext as before, used an ordinary ServerSocket
for accept(), and then wrapped that socket in a SSLSocket using the
configured SSLContext for returning a SSLSocketFactory:
Socket s = ss.accept();
sslc.getSocketFactory().createSocket( s, "blah", 443, true );
Connecting to my server from Mozilla I now get an error:
SSL_ERROR_RX_UNEXPECTED_CLIENT_HELLO -12246 "SSL received an
unexpected Client Hello handshake message."
So it looks like the SSLSocket thinks its a client... Is there a way
to configure this?
Yes, 'SSLSocket.setUseClientMode(boolean)'.