diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-03 10:29:56 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-03 10:29:56 -0400 |
| commit | 63fa4a684d15409e185422e7641e7c4680d19ec3 (patch) | |
| tree | f24b0535aed69c5eccd415c344675836d6349772 /node/Identity.hpp | |
| parent | 3635a940f921a10f229d67a30fde1be650d3a28e (diff) | |
| parent | 80d8b7d0ae56f1dce8b5b25ab7930df436755daf (diff) | |
| download | infinitytier-63fa4a684d15409e185422e7641e7c4680d19ec3.tar.gz infinitytier-63fa4a684d15409e185422e7641e7c4680d19ec3.zip | |
Merge my adamierymenko-dev into the new master that incorporates Raspberry Pi build changes in order to keep everything in sync.
Diffstat (limited to 'node/Identity.hpp')
| -rw-r--r-- | node/Identity.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/node/Identity.hpp b/node/Identity.hpp index 5cdfe9f8..1cce4fb0 100644 --- a/node/Identity.hpp +++ b/node/Identity.hpp @@ -104,7 +104,7 @@ public: _keyPair((EllipticCurveKeyPair *)0) { if (!fromString(str)) - throw std::invalid_argument("invalid string-serialized identity"); + throw std::invalid_argument(std::string("invalid string-serialized identity: ") + str); } Identity(const std::string &str) @@ -112,7 +112,7 @@ public: _keyPair((EllipticCurveKeyPair *)0) { if (!fromString(str)) - throw std::invalid_argument("invalid string-serialized identity"); + throw std::invalid_argument(std::string("invalid string-serialized identity: ") + str); } template<unsigned int C> @@ -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()); @@ -340,7 +340,7 @@ public: unsigned int p = startAt; - _address = b.field(p,ZT_ADDRESS_LENGTH); + _address.setTo(b.field(p,ZT_ADDRESS_LENGTH),ZT_ADDRESS_LENGTH); p += ZT_ADDRESS_LENGTH; if (b[p++] != IDENTITY_TYPE_NIST_P_521) |
