///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
| 124 | |
| 125 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 126 | void FSecure::C3::Core::NodeRelay::PostCommandToConnector(ByteView command, std::shared_ptr<DeviceBridge> senderPeripheral) |
| 127 | { |
| 128 | auto grc = GetGatewayReturnChannel(); |
| 129 | if (!grc) |
| 130 | throw std::runtime_error{ OBF("No GRC set while trying to send a S2G packet.") }; |
| 131 | |
| 132 | auto connectorHash = InterfaceFactory::Instance().Find<AbstractPeripheral>(senderPeripheral->GetTypeNameHash())->second.m_ClousureConnectorHash; |
| 133 | auto query = ProceduresS2G::DeliverToBinder::Create(RouteId{ GetAgentId(), grc->GetDid() }, FSecure::Utils::TimeSinceEpoch(), senderPeripheral->GetDid(), connectorHash, command, m_GatewayEncryptionKey); |
| 134 | LockAndSendPacket(query->ComposeQueryPacket(), grc); |
| 135 | } |
| 136 | |
| 137 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 138 | void FSecure::C3::Core::NodeRelay::SetGatewayReturnChannel(std::shared_ptr<DeviceBridge> const& gatewayReturnChannel) |
no test coverage detected