我正在使用 com.sun.net.httpserver.HttpsServer
作为 HTTPS 服务器并希望访问 SSL session 。
我在 HttpHandler
中处理请求.使用普通 SSLServerSocket
时我可以通过 SSLSocket.getSession(...)
访问客户端证书等方法,但我在 HttpExchange
中找不到这样的东西handle
的参数HttpHandler
中的方法.
有没有办法访问它?
最佳答案
将 HttpExchange
转换为 HttpsExchange
并从中获取 SSLSession
。
关于java - 使用sun HttpsServer时如何获取ssl session ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23224591/