| 1137 | } |
| 1138 | |
| 1139 | void ClientDestination::SetPrivateKeys (const i2p::data::PrivateKeys& keys) |
| 1140 | { |
| 1141 | if (m_StreamingDestination) m_StreamingDestination->Stop (); // close all streams |
| 1142 | CleanUp (); // delete sessions and tags |
| 1143 | auto pool = GetTunnelPool (); |
| 1144 | if (pool) pool->DetachTunnels (); |
| 1145 | m_Keys = keys; |
| 1146 | // update static keys |
| 1147 | for (auto it: m_EncryptionKeys) |
| 1148 | if (it.second) |
| 1149 | { |
| 1150 | it.second->GenerateKeys (); |
| 1151 | it.second->CreateDecryptor (); |
| 1152 | } |
| 1153 | if (m_StreamingDestination) m_StreamingDestination->Start (); |
| 1154 | } |
| 1155 | |
| 1156 | void ClientDestination::HandleDataMessage (const uint8_t * buf, size_t len, |
| 1157 | i2p::garlic::ECIESX25519AEADRatchetSession * from) |
no test coverage detected