tools: Fix broken ndnsec-op-tool
Change-Id: I058f5198c276246ee3d7392704b6579c107cdfa9
Refs: #3469
diff --git a/tools/ndnsec/op-tool.hpp b/tools/ndnsec/op-tool.hpp
index d72b014..5766949 100644
--- a/tools/ndnsec/op-tool.hpp
+++ b/tools/ndnsec/op-tool.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -26,8 +26,6 @@
#include "util.hpp"
-using namespace std;
-
int
ndnsec_op_tool(int argc, char** argv)
{
@@ -76,7 +74,7 @@
{
KeyChain keyChain;
- Buffer dataToSign((istreambuf_iterator<char>(cin)), istreambuf_iterator<char>());
+ Buffer dataToSign((std::istreambuf_iterator<char>(std::cin)), std::istreambuf_iterator<char>());
Block value = keyChain.sign(dataToSign.buf(), dataToSign.size(),
security::SigningInfo(security::SigningInfo::SIGNER_TYPE_CERT,
@@ -88,6 +86,7 @@
return -1;
}
+ value.encode();
std::cout.write(reinterpret_cast<const char*>(value.wire()), value.size());
}