support of multiple incoming garlic sessions

This commit is contained in:
orignal 2014-01-09 22:51:33 -05:00
parent 991a80428d
commit ebc6811e71
2 changed files with 12 additions and 12 deletions

View file

@ -3,7 +3,6 @@
#include <inttypes.h>
#include <map>
#include <set>
#include <string>
#include <cryptopp/modes.h>
#include <cryptopp/aes.h>
@ -75,7 +74,7 @@ namespace garlic
private:
void HandleAESBlock (uint8_t * buf, size_t len);
void HandleAESBlock (uint8_t * buf, size_t len, uint8_t * sessionKey);
void HandleGarlicPayload (uint8_t * buf, size_t len);
private:
@ -83,8 +82,7 @@ namespace garlic
// outgoing sessions
std::map<i2p::data::IdentHash, GarlicRoutingSession *> m_Sessions;
// incoming session
uint8_t m_SessionKey[32];
std::set<std::string> m_SessionTags;
std::map<std::string, std::string> m_SessionTags; // tag -> key
CryptoPP::CBC_Mode<CryptoPP::AES>::Decryption m_Decryption;
};