diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-25 13:24:39 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-25 13:24:39 -0400 |
| commit | 9cf734b74a750b8af0c628809c16be57eef1ff21 (patch) | |
| tree | 30170edf778919d7097fd007e1a0ff73cdfa9c32 /node/Pack.cpp | |
| parent | 083ae2d0974394862735bf1ceff6a71f5e4dac64 (diff) | |
| download | infinitytier-9cf734b74a750b8af0c628809c16be57eef1ff21.tar.gz infinitytier-9cf734b74a750b8af0c628809c16be57eef1ff21.zip | |
Sane-ify Address, get rid of goofy union thingy.
Diffstat (limited to 'node/Pack.cpp')
| -rw-r--r-- | node/Pack.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/node/Pack.cpp b/node/Pack.cpp index 8bac1300..98686559 100644 --- a/node/Pack.cpp +++ b/node/Pack.cpp @@ -62,7 +62,7 @@ const Pack::Entry *Pack::put(const std::string &name,const std::string &content) SHA256_Update(&sha,content.data(),content.length()); SHA256_Final(e.sha256,&sha); - e.signedBy.zero(); + e.signedBy = 0; e.signature.assign((const char *)0,0); return &e; @@ -81,7 +81,7 @@ std::string Pack::serialize() const entry.push_back(e->second.name); entry.push_back(e->second.content); entry.push_back(std::string((const char *)e->second.sha256,sizeof(e->second.sha256))); - entry.push_back(std::string((const char *)e->second.signedBy.data(),e->second.signedBy.size())); + entry.push_back(e->second.signedBy.toBinaryString()); entry.push_back(e->second.signature); archive.push_back(entry.serialize()); } @@ -123,8 +123,8 @@ bool Pack::deserialize(const void *sd,unsigned int sdlen) memcpy(e.sha256,dig,32); if (entry[3].length() == ZT_ADDRESS_LENGTH) - e.signedBy = entry[3].data(); - else e.signedBy.zero(); + e.signedBy.setTo(entry[3].data()); + else e.signedBy = 0; e.signature = entry[4]; } return true; |
