| 127 | } |
| 128 | |
| 129 | Status ThriftClientImpl::CreateSocket() { |
| 130 | if (!ssl_) { |
| 131 | socket_.reset(new TSocket(address_.hostname, address_.port)); |
| 132 | } else { |
| 133 | try { |
| 134 | ssl_factory_->configureCiphers(FLAGS_ssl_cipher_list, FLAGS_tls_ciphersuites, |
| 135 | disable_tls12_); |
| 136 | ssl_factory_->loadTrustedCertificates(FLAGS_ssl_client_ca_certificate.c_str()); |
| 137 | socket_ = ssl_factory_->createSocket(address_.hostname, address_.port); |
| 138 | } catch (const TException& e) { |
| 139 | return Status(TErrorCode::SSL_SOCKET_CREATION_FAILED, e.what()); |
| 140 | } |
| 141 | } |
| 142 | if (socket_ != nullptr) { |
| 143 | // ThriftClient is used for internal cluster communication, so we use |
| 144 | // ThriftInternalRpcMaxMessageSize(). |
| 145 | SetMaxMessageSize(socket_.get(), ThriftInternalRpcMaxMessageSize()); |
| 146 | } |
| 147 | |
| 148 | return Status::OK(); |
| 149 | } |
| 150 | |
| 151 | } |
nothing calls this directly
no test coverage detected