我正在编写一个应用程序,它将SSLEngine与NIO一起使用,我同时编写客户端和服务器。 客户端能够连接到服务器,他连接后,我希望他能够执行会话恢复/重新协商,但目前没有运气.. 由于使用SSLEngine的代码是相当大的(SSLEngine用法是很复杂),我会写一个简单的伪代码演示情况: Server:
global sslcontext initialized once
我有用C#和服务器在JAVA中编写的客户端。因此,当我尝试连接时,服务器javax.net.ssl.SSLHandshakeException: no cipher suites in common和C#“EOF或0字节”中出现错误。 [C#]: TcpClient tc = new TcpClient(server, 1337);
using (sslStream = new
这是针对“SSL Handshaking Using Self-Signed Certs and SSLEngine (JSSE)”的后续问题。 我已经实现了一个NIO网络服务器,可以在同一个端口上处理SSL和非SSL消息。为了区分SSL和非SSL消息,我检查入站请求的第一个字节以查看它是否为SSL/TLS消息。例如: byte a = read(buf);
if (totalBytesRead