SSLSocket socket =
<BUG>(SSLSocket) ssf.createSocket(_socket_, ip, port, false);
</BUG>
socket.setEnableSessionCreation(isCreation);
socket.setUseClientMode(isClientMode);
<BUG>if (!isClientMode) {
socket.setNeedClientAuth(isNeedClientAuth);</BUG>
socket.setWantClientAuth(isWantClientAuth);
}
if (protocols != null) {

SSLSocket socket =
(SSLSocket) ssf.createSocket(_socket_, host, port, false);
socket.setEnableSessionCreation(isCreation);
socket.setUseClientMode(isClientMode);
if (isClientMode) {
if (tlsEndpointChecking) {
SSLSocketUtils.enableEndpointNameVerification(socket);
}
} else { // server mode
socket.setNeedClientAuth(isNeedClientAuth);
socket.setWantClientAuth(isWantClientAuth);
}
if (protocols != null) {
