diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-26 20:00:37 -0500 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2018-01-26 20:00:37 -0500 |
| commit | f3dfd636343904a01681c80e91b44aa00ce33f2e (patch) | |
| tree | 12ab5514aaffaba0759bef88fa3b2c8a34bad565 /one.cpp | |
| parent | 5f5302e59535c988188e3857469c5414014d62c4 (diff) | |
| download | infinitytier-f3dfd636343904a01681c80e91b44aa00ce33f2e.tar.gz infinitytier-f3dfd636343904a01681c80e91b44aa00ce33f2e.zip | |
Clean up some old stuff.
Diffstat (limited to 'one.cpp')
| -rw-r--r-- | one.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -795,7 +795,7 @@ static int idtool(int argc,char **argv) } C25519::Signature signature = id.sign(inf.data(),(unsigned int)inf.length()); char hexbuf[1024]; - printf("%s",Utils::hex(signature.data,(unsigned int)signature.size(),hexbuf)); + printf("%s",Utils::hex(signature.data,ZT_C25519_SIGNATURE_LEN,hexbuf)); } else if (!strcmp(argv[1],"verify")) { if (argc < 4) { idtoolPrintHelp(stdout,argv[0]); @@ -838,8 +838,8 @@ static int idtool(int argc,char **argv) nlohmann::json mj; mj["objtype"] = "world"; mj["worldType"] = "moon"; - mj["updatesMustBeSignedBy"] = mj["signingKey"] = Utils::hex(kp.pub.data,(unsigned int)kp.pub.size(),idtmp); - mj["signingKey_SECRET"] = Utils::hex(kp.priv.data,(unsigned int)kp.priv.size(),idtmp); + mj["updatesMustBeSignedBy"] = mj["signingKey"] = Utils::hex(kp.pub.data,ZT_C25519_PUBLIC_KEY_LEN,idtmp); + mj["signingKey_SECRET"] = Utils::hex(kp.priv.data,ZT_C25519_PRIVATE_KEY_LEN,idtmp); mj["id"] = id.address().toString(idtmp); nlohmann::json seedj; seedj["identity"] = id.toString(false,idtmp); @@ -878,9 +878,9 @@ static int idtool(int argc,char **argv) C25519::Pair signingKey; C25519::Public updatesMustBeSignedBy; - Utils::unhex(OSUtils::jsonString(mj["signingKey"],"").c_str(),signingKey.pub.data,(unsigned int)signingKey.pub.size()); - Utils::unhex(OSUtils::jsonString(mj["signingKey_SECRET"],"").c_str(),signingKey.priv.data,(unsigned int)signingKey.priv.size()); - Utils::unhex(OSUtils::jsonString(mj["updatesMustBeSignedBy"],"").c_str(),updatesMustBeSignedBy.data,(unsigned int)updatesMustBeSignedBy.size()); + Utils::unhex(OSUtils::jsonString(mj["signingKey"],"").c_str(),signingKey.pub.data,ZT_C25519_PUBLIC_KEY_LEN); + Utils::unhex(OSUtils::jsonString(mj["signingKey_SECRET"],"").c_str(),signingKey.priv.data,ZT_C25519_PRIVATE_KEY_LEN); + Utils::unhex(OSUtils::jsonString(mj["updatesMustBeSignedBy"],"").c_str(),updatesMustBeSignedBy.data,ZT_C25519_PUBLIC_KEY_LEN); std::vector<World::Root> roots; nlohmann::json &rootsj = mj["roots"]; |
