summaryrefslogtreecommitdiff
path: root/node/Identity.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-29 13:56:20 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-29 13:56:20 -0400
commita53cfc909638ea9eeb2bd477cee20d106f79bf6d (patch)
treecbac1b06e6cbf1a88868cb6da06c347bb8561880 /node/Identity.cpp
parente7b515c86c34e2805e136152a2719bc6ad86e46f (diff)
downloadinfinitytier-a53cfc909638ea9eeb2bd477cee20d106f79bf6d.tar.gz
infinitytier-a53cfc909638ea9eeb2bd477cee20d106f79bf6d.zip
Network membership certificate work in progress... does not build yet.
Diffstat (limited to 'node/Identity.cpp')
-rw-r--r--node/Identity.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/node/Identity.cpp b/node/Identity.cpp
index a7ef403d..fdfdcd99 100644
--- a/node/Identity.cpp
+++ b/node/Identity.cpp
@@ -58,7 +58,7 @@ void Identity::generate()
// invalid. Of course, deep verification of address/key relationship is
// required to cover the more elaborate address claim jump attempt case.
unsigned char atmp[ZT_ADDRESS_LENGTH];
- _address.copyTo(atmp);
+ _address.copyTo(atmp,ZT_ADDRESS_LENGTH);
SHA256_CTX sha;
unsigned char dig[32];
unsigned char idtype = IDENTITY_TYPE_NIST_P_521,zero = 0;
@@ -76,7 +76,7 @@ void Identity::generate()
bool Identity::locallyValidate(bool doAddressDerivationCheck) const
{
unsigned char atmp[ZT_ADDRESS_LENGTH];
- _address.copyTo(atmp);
+ _address.copyTo(atmp,ZT_ADDRESS_LENGTH);
SHA256_CTX sha;
unsigned char dig[32];
unsigned char idtype = IDENTITY_TYPE_NIST_P_521,zero = 0;
@@ -222,7 +222,7 @@ Address Identity::deriveAddress(const void *keyBytes,unsigned int keyLen)
delete [] ram;
- return Address(dig); // first 5 bytes of dig[]
+ return Address(dig,ZT_ADDRESS_LENGTH); // first 5 bytes of dig[]
}
std::string Identity::encrypt(const Identity &to,const void *data,unsigned int len) const