summaryrefslogtreecommitdiff
path: root/node/Identity.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2014-01-21 13:07:22 -0800
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2014-01-21 13:07:22 -0800
commit370dd6c4da6acff85947cef365e4df48c00d0863 (patch)
tree96dd0db7a3fcecb6354276ed23c6274c5b7804d7 /node/Identity.cpp
parent06ca24e8e2b663842fee7daabac4a2652da5a834 (diff)
downloadinfinitytier-370dd6c4da6acff85947cef365e4df48c00d0863.tar.gz
infinitytier-370dd6c4da6acff85947cef365e4df48c00d0863.zip
Several things:
(1) Add a bunch of tedious type casts to eliminate unnecessary compiler warnings on Windows X64 builds. (2) Some EthernetTap work to integrate Windows custom IOCTL for multicast group lookup (not done quite yet). (3) Dump some more info in selftest to make sure our Windows path lookup functions are returning sane results.
Diffstat (limited to 'node/Identity.cpp')
-rw-r--r--node/Identity.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/node/Identity.cpp b/node/Identity.cpp
index 859a129f..15eae245 100644
--- a/node/Identity.cpp
+++ b/node/Identity.cpp
@@ -90,7 +90,7 @@ struct _Identity_generate_cond
inline bool operator()(const C25519::Pair &kp) const
throw()
{
- _computeMemoryHardHash(kp.pub.data,kp.pub.size(),digest,genmem);
+ _computeMemoryHardHash(kp.pub.data,(unsigned int)kp.pub.size(),digest,genmem);
return (digest[0] < ZT_IDENTITY_GEN_HASHCASH_FIRST_BYTE_LESS_THAN);
}
unsigned char *digest;
@@ -123,7 +123,7 @@ bool Identity::locallyValidate() const
unsigned char digest[64];
char *genmem = new char[ZT_IDENTITY_GEN_MEMORY];
- _computeMemoryHardHash(_publicKey.data,_publicKey.size(),digest,genmem);
+ _computeMemoryHardHash(_publicKey.data,(unsigned int)_publicKey.size(),digest,genmem);
delete [] genmem;
unsigned char addrb[5];
@@ -144,10 +144,10 @@ std::string Identity::toString(bool includePrivate) const
r.append(_address.toString());
r.append(":0:"); // 0 == IDENTITY_TYPE_C25519
- r.append(Utils::hex(_publicKey.data,_publicKey.size()));
+ r.append(Utils::hex(_publicKey.data,(unsigned int)_publicKey.size()));
if ((_privateKey)&&(includePrivate)) {
r.push_back(':');
- r.append(Utils::hex(_privateKey->data,_privateKey->size()));
+ r.append(Utils::hex(_privateKey->data,(unsigned int)_privateKey->size()));
}
return r;
@@ -176,12 +176,12 @@ bool Identity::fromString(const char *str)
return false;
break;
case 2:
- if (Utils::unhex(f,_publicKey.data,_publicKey.size()) != _publicKey.size())
+ if (Utils::unhex(f,_publicKey.data,(unsigned int)_publicKey.size()) != _publicKey.size())
return false;
break;
case 3:
_privateKey = new C25519::Private();
- if (Utils::unhex(f,_privateKey->data,_privateKey->size()) != _privateKey->size())
+ if (Utils::unhex(f,_privateKey->data,(unsigned int)_privateKey->size()) != _privateKey->size())
return false;
break;
default: