enale tunnl test encryption back

This commit is contained in:
orignal 2014-12-08 19:33:50 -05:00
parent bb05bcf39f
commit cb06f8e0bb

View file

@ -208,10 +208,16 @@ namespace tunnel
} }
if (!failed) if (!failed)
{ {
uint32_t msgID = rnd.GenerateWord32 (); uint8_t key[32], tag[32];
m_Tests[msgID] = std::make_pair (*it1, *it2); rnd.GenerateBlock (key, 32); // random session key
(*it1)->SendTunnelDataMsg ((*it2)->GetNextIdentHash (), (*it2)->GetNextTunnelID (), rnd.GenerateBlock (tag, 32); // random session tag
CreateDeliveryStatusMsg (msgID)); m_LocalDestination.SubmitSessionKey (key, tag);
i2p::garlic::GarlicRoutingSession garlic (key, tag);
uint32_t msgID = rnd.GenerateWord32 ();
m_Tests[msgID] = std::make_pair (*it1, *it2);
(*it1)->SendTunnelDataMsg ((*it2)->GetNextIdentHash (), (*it2)->GetNextTunnelID (),
garlic.WrapSingleMessage (CreateDeliveryStatusMsg (msgID)));
it1++; it2++; it1++; it2++;
} }
} }