I'm interested in using a client token to perform client certificate authentication for SSL/TLS, but the client private key resides on a (non-PKCS11-accessible) hardware token. I originally wanted to replace the key manager, but I can't return the private keys from the token, so I am considering modifying the underlying SSLSocket and related classes to accomplish my goal.
In which Java classes is the private key used in the establishment of the TLS session so that I could override that functionality? Any other suggestions?