are there some APIs in java that equals to OpenSSL APIs such as ssl_accept(),SSL_connect,ssl_read(),ssl_write() and so on ?
thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is more or less the same answer as the one I posted to your other question.
If you turn a
Socketinto anSSLSocketusingSSLSocketFactory.createSocket(Socket, String, int, boolean), you can still turn it into a server-sideSSLSocketusingSSLSocket.setUseClientMode(false), as long as you haven’t started to read/write using the I/O streams of theSSLSocket(this would trigger the handshake at you can’t change the mode after that).Alternatively, you can use
SSLEngine. To be honest, it tends to be harder to use. You may find examples in the SSL implementations of Simple, Grizzly and Jetty (in NIO mode).