| 401 | } |
| 402 | |
| 403 | err_t TcpConnection::internalOnConnected(err_t err) |
| 404 | { |
| 405 | debug_tcp_d("connected: useSSL: %d, Error: %d", useSsl, err); |
| 406 | |
| 407 | if(useSsl && err == ERR_OK) { |
| 408 | if(ssl == nullptr) { |
| 409 | debug_tcp_e("SSL disabled: aborting connection"); |
| 410 | return ERR_ABRT; |
| 411 | } |
| 412 | if(!ssl->onConnect(tcp)) { |
| 413 | return ERR_ABRT; |
| 414 | } |
| 415 | if(!ssl->isConnected()) { |
| 416 | return ERR_OK; |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | err_t res = onConnected(err); |
| 421 | checkSelfFree(); |
| 422 | debug_tcp_ext("<connected"); |
| 423 | return res; |
| 424 | } |
| 425 | |
| 426 | bool TcpConnection::enableSsl(const String& hostName) |
| 427 | { |
no test coverage detected