Hi,
I want SSL client server communication between OpenSSL Server with Java
Client.
My OpenSSL Server with OpenSSL Client works, Java Server with Java Client
works.
But OpenSSL Server with Java Client fails in SSL_accept().gives
SSL_ERROR_SSL.
I have first created a plain TCP socket, and after getting new fd from
accept() I associate it with SSL obj and waiting for handshaking in
SSL_accept (), where it fails ..
sd = accept(ListenSocket, NULL, NULL); // Connected with TCP
ssl = SSL_new (ctx); CHK_NULL(ssl);
SSL_set_fd (ssl, sd);
printf("waiting for ssl_connect\n");
* err = SSL_accept (ssl); // Fails Here.
// We call SSL_Connect from
OpenSSL Client, in that case it works. What is similar to this in Java?*
My Java code
Socket sClientSock = new Socket();
sClientSock.connect(socAddress,5000); // Connected with TCP
SSLSocketFactory sslsocketfactory = (SSLSocketFactory)
SSLSocketFactory.getDefault();
SSLSocket sslsocket = (SSLSocket)
sslsocketfactory.createSocket(sClientSock,"localhost", 9999,true);
//sslsocket.setUseClientMode(true);
//sslsocket.startHandshake();
I also tried calling handshaking from java but did't work.
Any suggestion about this problem ?
Is there any good example related to it ?
--
...Swapnil
|| Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
|| Hare Rama Hare Rama Rama Rama Hare Hare ||