| 97 | } |
| 98 | |
| 99 | void TcpConnection::tls_solved_pow(td::SocketPipe pipe) { |
| 100 | td::connect( |
| 101 | [self = actor_id(this)](td::Result<std::pair<td::Pipe, RATLSAttestedPeerInfo>> R) { |
| 102 | if (R.is_ok()) { |
| 103 | auto res = R.move_as_ok(); |
| 104 | td::actor::send_closure(self, &TcpConnection::tls_created_pipe, std::move(res.first), res.second.report()); |
| 105 | } else { |
| 106 | td::actor::send_closure(self, &TcpConnection::fail, |
| 107 | R.move_as_error_prefix("tcp: failed to create tls connection: ")); |
| 108 | } |
| 109 | }, |
| 110 | wrap_tls_client("conn", std::move(pipe), type_->type.get<TcpConnectionTls>().cert_and_key, |
| 111 | type_->type.get<TcpConnectionTls>().policy, td::IPAddress{}, td::IPAddress{})); |
| 112 | } |
| 113 | |
| 114 | void TcpConnection::tls_created_pipe(td::Pipe pipe, const RATLSAttestationReport &report) { |
| 115 | process_attestation(report); |
nothing calls this directly
no test coverage detected