I've been trying to get an example working where the client passes a PSK ID 开发者_JAVA百科to the server as part of the first TLS (TLS1.3) handshake and have been unsuccessful in doing so. I am using OpenJDK11.
I have been able to work with X.509 by setting the right key and trust managers, but haven't been able to get a working example of using PSK for 0-RTT on first handshake.
Any pointers of how one would go about setting the pskIdentities would be much appreciated. The PreSharedKeyExtension class seems to only set the PSK ID extension for resumptions and not the first handshake, hence my confusion.
精彩评论