| 155 | |
| 156 | |
| 157 | void HTTPSClientSession::connect(const SocketAddress& address) |
| 158 | { |
| 159 | bool useProxy = !getProxyHost().empty() && !bypassProxy(); |
| 160 | |
| 161 | if (useProxy && isProxyTunnel()) |
| 162 | { |
| 163 | StreamSocket proxySocket(proxyConnect()); |
| 164 | SecureStreamSocket secureSocket = SecureStreamSocket::attach(proxySocket, getHost(), _pContext, _pSession); |
| 165 | attachSocket(secureSocket); |
| 166 | if (_pContext->sessionCacheEnabled()) |
| 167 | { |
| 168 | _pSession = secureSocket.currentSession(); |
| 169 | } |
| 170 | } |
| 171 | else |
| 172 | { |
| 173 | SecureStreamSocket sss(socket()); |
| 174 | if (sss.getPeerHostName().empty()) |
| 175 | { |
| 176 | sss.setPeerHostName(useProxy ? getProxyHost() : getHost()); |
| 177 | } |
| 178 | if (_pContext->sessionCacheEnabled()) |
| 179 | { |
| 180 | sss.useSession(_pSession); |
| 181 | } |
| 182 | HTTPSession::connect(address); |
| 183 | if (_pContext->sessionCacheEnabled()) |
| 184 | { |
| 185 | _pSession = sss.currentSession(); |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | |
| 191 | int HTTPSClientSession::read(char* buffer, std::streamsize length) |
nothing calls this directly
no test coverage detected