///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
| 169 | |
| 170 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 171 | void FSecure::C3::Core::NodeRelay::InitializeRoute() |
| 172 | { |
| 173 | // Sanity check. |
| 174 | auto grc = GetGatewayReturnChannel(); |
| 175 | if (!grc) |
| 176 | throw std::runtime_error{ OBF("No GRC.") }; |
| 177 | |
| 178 | // And post it to Neighbor through GRC. |
| 179 | auto query = ProceduresN2N::InitializeRouteQuery::Create(RouteId{ GetAgentId(), grc->GetDid() }, GetBuildId(), m_GatewayEncryptionKey, m_MyEncryptionKey, grc->GetTypeNameHash(), FSecure::Utils::TimeSinceEpoch(), FSecure::Utils::TimeSinceEpoch()); |
| 180 | LockAndSendPacket(query->ComposeQueryPacket(), grc); |
| 181 | } |
| 182 | |
| 183 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 184 | void FSecure::C3::Core::NodeRelay::NegotiateChannel(std::shared_ptr<DeviceBridge> const& device) |
no test coverage detected