Negotiates a TLS session using an SSL socket factory.
Creates an SSL socket using the supplied SSL socket factory and
attaches it to the existing connection. Performs the TLS handshake
and returns the negotiated session information.
If cipher suites have been set via setEnabledCipherSuites
then they are enabled before the TLS handshake begins.
Hostname verification is performed after the TLS handshake completes.
The default check performs a case insensitive match of the server's
hostname against that in the server's certificate. The server's
hostname is extracted from the subjectAltName in the server's
certificate (if present). Otherwise the value of the common name
attribute of the subject name is used. If a callback has
been set via setHostnameVerifier then that verifier is used if
the default check fails.
If an error occurs then the SSL socket is closed and an IOException
is thrown. The underlying connection remains intact.
Parameters: factory - The possibly null SSL socket factory to use.If null, the default SSL socket factory is used. The negotiated SSL session See Also: StartTlsResponseImpl.setEnabledCipherSuites See Also: StartTlsResponseImpl.setHostnameVerifier |