This commit is contained in:
Adam Ierymenko 2016-08-04 10:39:28 -07:00
parent 5cf410490e
commit 56febbf2ba
5 changed files with 29 additions and 103 deletions

View file

@ -21,12 +21,13 @@
#include "Identity.hpp"
#include "Topology.hpp"
#include "Switch.hpp"
#include "Network.hpp"
namespace ZeroTier {
int Tag::verify(const RuntimeEnvironment *RR) const
{
if (!_signedBy)
if ((!_signedBy)||(_signedBy != Network::controllerFor(_nwid)))
return -1;
const Identity id(RR->topology->getIdentity(_signedBy));
if (!id) {