Sane-ify Address, get rid of goofy union thingy.

This commit is contained in:
Adam Ierymenko 2013-07-25 13:24:39 -04:00
parent 083ae2d097
commit 9cf734b74a
6 changed files with 138 additions and 73 deletions

View file

@ -307,7 +307,7 @@ public:
inline void serialize(Buffer<C> &b,bool includePrivate = false) const
throw(std::out_of_range)
{
b.append(_address.data(),ZT_ADDRESS_LENGTH);
_address.appendTo(b);
b.append((unsigned char)IDENTITY_TYPE_NIST_P_521);
b.append((unsigned char)(_publicKey.size() & 0xff));
b.append(_publicKey.data(),_publicKey.size());