Change "encrypted" flag to full cipher suite selector. Go ahead and reserve AES256-GCM which might be added in the future.

This commit is contained in:
Adam Ierymenko 2014-10-02 10:54:34 -07:00
parent e53d208ea4
commit 23836d4c11
2 changed files with 104 additions and 33 deletions

View file

@ -47,7 +47,7 @@ namespace ZeroTier {
bool IncomingPacket::tryDecode(const RuntimeEnvironment *RR)
{
try {
if ((!encrypted())&&(verb() == Packet::VERB_HELLO)) {
if ((cipher() == ZT_PROTO_CIPHER_SUITE__C25519_POLY1305_NONE)&&(verb() == Packet::VERB_HELLO)) {
// Unencrypted HELLOs are handled here since they are used to
// populate our identity cache in the first place. _doHELLO() is special
// in that it contains its own authentication logic.