0

I am using the com.sun.net.httpserver.HttpsServer as Https Server and want to access the SSL session.

I handle the requests in a HttpHandler. When using a plain SSLServerSocket i can access the client certificate etc. via the SSLSocket.getSession(...) method but i couldn't found such a thing in the HttpExchange parameter of the handle method inside the HttpHandler.

Is there a way to access it?

Nick Russler
  • 4,608
  • 6
  • 51
  • 88

1 Answers1

2

Cast the HttpExchange to an HttpsExchange and get the SSLSession from that.

user207421
  • 305,947
  • 44
  • 307
  • 483