switch to ndn-cxx KeyChain v2

ValidatorConfig is temporarily disabled. All commands are
authorized without validation.

refs #4091

Change-Id: I4eea8cd954761424d2d084bda4e8510320b5fb46
diff --git a/tools/ndnputfile.cpp b/tools/ndnputfile.cpp
index f08a7a3..078be77 100644
--- a/tools/ndnputfile.cpp
+++ b/tools/ndnputfile.cpp
@@ -366,16 +366,12 @@
 NdnPutFile::signData(ndn::Data& data)
 {
   if (useDigestSha256) {
-    m_keyChain.signWithSha256(data);
+    m_keyChain.sign(data, ndn::signingWithSha256());
   }
+  else if (identityForData.empty())
+    m_keyChain.sign(data);
   else {
-    if (identityForData.empty())
-      m_keyChain.sign(data);
-    else {
-      ndn::Name keyName = m_keyChain.getDefaultKeyNameForIdentity(ndn::Name(identityForData));
-      ndn::Name certName = m_keyChain.getDefaultCertificateNameForKey(keyName);
-      m_keyChain.sign(data, certName);
-    }
+    m_keyChain.sign(data, ndn::signingByIdentity(identityForData));
   }
 }
 
diff --git a/tools/ndnrepowatch.cpp b/tools/ndnrepowatch.cpp
index 4172d79..4d2d9c5 100644
--- a/tools/ndnrepowatch.cpp
+++ b/tools/ndnrepowatch.cpp
@@ -22,6 +22,7 @@
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/security/signing-helpers.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
 #include <fstream>
 #include <string>
@@ -287,7 +288,7 @@
   if (identityForCommand.empty())
     m_keyChain.sign(interest);
   else {
-    m_keyChain.signByIdentity(interest, ndn::Name(identityForCommand));
+    m_keyChain.sign(interest, ndn::signingByIdentity(identityForCommand));
   }
 
   return interest;