Reputation: 44
I want to see more details that happen during the handshake between my application and the server. Specifically, I'm trying to access the ServerHello and ClientHello objects. Until Java 16, the sun.security package was used for this purpose, however, that package was removed from Java 16. I use java 17. Handshake is executed successfully, I use SSLSocket for which I have set parameters to connect to the server, and SessionHolderHandshakeCompletedListener object through which I extract the certificates that I get from the server. But I'm missing the part that would detect the ClientHello and ServerHello happening during the session. And none of the built methods offered by these objects (sslSocket and sessionHolder) help me to access these objects. Can you point me to some example or documentation so that I can understand what is happening in the background of the tls handshake?
I created SSLSocket to my server, and set all the necessary parameters. Also, I set the SessionHolderHandshakeCompletedListener to listen when handshake is completed. I expect to extract ClientHello and ServerHello from the session, but none of methods does not seem to help.
Upvotes: 0
Views: 380