From a53cfc909638ea9eeb2bd477cee20d106f79bf6d Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 29 Jul 2013 13:56:20 -0400 Subject: Network membership certificate work in progress... does not build yet. --- node/Identity.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'node/Identity.cpp') 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 -- cgit v1.2.3