| 1291 | } |
| 1292 | |
| 1293 | void RouterContext::PostGarlicMessage (std::shared_ptr<I2NPMessage> msg) |
| 1294 | { |
| 1295 | uint8_t * buf = msg->GetPayload (); |
| 1296 | uint32_t len = bufbe32toh (buf); |
| 1297 | if (len > msg->GetLength ()) |
| 1298 | { |
| 1299 | LogPrint (eLogWarning, "Router: garlic message length ", len, " exceeds I2NP message length ", msg->GetLength ()); |
| 1300 | return; |
| 1301 | } |
| 1302 | buf += 4; |
| 1303 | if (!HandleECIESx25519TagMessage (buf, len)) // try tag first |
| 1304 | { |
| 1305 | // then Noise_N one-time decryption |
| 1306 | if (m_ECIESSession) |
| 1307 | m_ECIESSession->HandleNextMessage (buf, len); |
| 1308 | else |
| 1309 | LogPrint (eLogError, "Router: Session is not set for ECIES router"); |
| 1310 | } |
| 1311 | } |
| 1312 | |
| 1313 | void RouterContext::ProcessDeliveryStatusMessage (std::shared_ptr<I2NPMessage> msg) |
| 1314 | { |
nothing calls this directly
no test coverage detected