mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Naming...
This commit is contained in:
parent
15402933bc
commit
740b34124f
1 changed files with 5 additions and 5 deletions
|
@ -150,7 +150,7 @@ public:
|
||||||
if (fullSignatureCheck) {
|
if (fullSignatureCheck) {
|
||||||
Buffer<ZT_WORLD_MAX_SERIALIZED_LENGTH> tmp;
|
Buffer<ZT_WORLD_MAX_SERIALIZED_LENGTH> tmp;
|
||||||
update.serialize(tmp,true);
|
update.serialize(tmp,true);
|
||||||
return C25519::verify(_updateSigningKey,tmp.data(),tmp.size(),update._signature);
|
return C25519::verify(_updatesMustBeSignedBy,tmp.data(),tmp.size(),update._signature);
|
||||||
} else return true;
|
} else return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -169,7 +169,7 @@ public:
|
||||||
b.append((uint8_t)0x01);
|
b.append((uint8_t)0x01);
|
||||||
b.append((uint64_t)_id);
|
b.append((uint64_t)_id);
|
||||||
b.append((uint64_t)_ts);
|
b.append((uint64_t)_ts);
|
||||||
b.append(_updateSigningKey.data,ZT_C25519_PUBLIC_KEY_LEN);
|
b.append(_updatesMustBeSignedBy.data,ZT_C25519_PUBLIC_KEY_LEN);
|
||||||
if (!forSign)
|
if (!forSign)
|
||||||
b.append(_signature.data,ZT_C25519_SIGNATURE_LEN);
|
b.append(_signature.data,ZT_C25519_SIGNATURE_LEN);
|
||||||
b.append((uint8_t)_roots.size());
|
b.append((uint8_t)_roots.size());
|
||||||
|
@ -195,7 +195,7 @@ public:
|
||||||
|
|
||||||
_id = b.template at<uint64_t>(p); p += 8;
|
_id = b.template at<uint64_t>(p); p += 8;
|
||||||
_ts = b.template at<uint64_t>(p); p += 8;
|
_ts = b.template at<uint64_t>(p); p += 8;
|
||||||
memcpy(_updateSigningKey.data,b.field(p,ZT_C25519_PUBLIC_KEY_LEN),ZT_C25519_PUBLIC_KEY_LEN); p += ZT_C25519_PUBLIC_KEY_LEN;
|
memcpy(_updatesMustBeSignedBy.data,b.field(p,ZT_C25519_PUBLIC_KEY_LEN),ZT_C25519_PUBLIC_KEY_LEN); p += ZT_C25519_PUBLIC_KEY_LEN;
|
||||||
memcpy(_signature.data,b.field(p,ZT_C25519_SIGNATURE_LEN),ZT_C25519_SIGNATURE_LEN); p += ZT_C25519_SIGNATURE_LEN;
|
memcpy(_signature.data,b.field(p,ZT_C25519_SIGNATURE_LEN),ZT_C25519_SIGNATURE_LEN); p += ZT_C25519_SIGNATURE_LEN;
|
||||||
unsigned int numRoots = b[p++];
|
unsigned int numRoots = b[p++];
|
||||||
if (numRoots > ZT_WORLD_MAX_ROOTS)
|
if (numRoots > ZT_WORLD_MAX_ROOTS)
|
||||||
|
@ -216,13 +216,13 @@ public:
|
||||||
return (p - startAt);
|
return (p - startAt);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator==(const World &w) const throw() { return ((_id == w._id)&&(_ts == w._ts)&&(_updateSigningKey == w._updateSigningKey)&&(_signature == w._signature)&&(_roots == w._roots)); }
|
inline bool operator==(const World &w) const throw() { return ((_id == w._id)&&(_ts == w._ts)&&(_updatesMustBeSignedBy == w._updatesMustBeSignedBy)&&(_signature == w._signature)&&(_roots == w._roots)); }
|
||||||
inline bool operator!=(const World &w) const throw() { return (!(*this == w)); }
|
inline bool operator!=(const World &w) const throw() { return (!(*this == w)); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
uint64_t _id;
|
uint64_t _id;
|
||||||
uint64_t _ts;
|
uint64_t _ts;
|
||||||
C25519::Public _updateSigningKey;
|
C25519::Public _updatesMustBeSignedBy;
|
||||||
C25519::Signature _signature;
|
C25519::Signature _signature;
|
||||||
std::vector<Root> _roots;
|
std::vector<Root> _roots;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue