switch to ndn-cxx KeyChain v2

refs #4089

Change-Id: I32bc19db156de49275b681ef67f684b76631d50b
diff --git a/tools/ndn-autoconfig/guess-from-identity-name.cpp b/tools/ndn-autoconfig/guess-from-identity-name.cpp
index b9700aa..8b0c392 100644
--- a/tools/ndn-autoconfig/guess-from-identity-name.cpp
+++ b/tools/ndn-autoconfig/guess-from-identity-name.cpp
@@ -24,6 +24,8 @@
  */
 
 #include "guess-from-identity-name.hpp"
+#include <ndn-cxx/security/pib/identity.hpp>
+#include <ndn-cxx/security/pib/pib.hpp>
 
 namespace ndn {
 namespace tools {
@@ -40,7 +42,7 @@
 {
   std::cerr << "Trying default identity name..." << std::endl;
 
-  Name identity = m_keyChain.getDefaultIdentity();
+  Name identity = m_keyChain.getPib().getDefaultIdentity().getName();
 
   std::ostringstream serverName;
   for (auto i = identity.rbegin(); i != identity.rend(); ++i) {