Switch to new KeyChain where possible

signed_interest::POS_RANDOM_VAL and signed_interest::POS_TIMESTAMP
constants are deprecated. Use command_interest:: equivalents instead.

This commit also includes fix for the backward compatibility regression
due to move of deprecated TPM/PublicInfo header files.

Change-Id: Ic3b008fc6758f3ac83f191158b6ac0789483f90d
Refs: #3098
diff --git a/src/security/validator-config.cpp b/src/security/validator-config.cpp
index 64c0187..f267377 100644
--- a/src/security/validator-config.cpp
+++ b/src/security/validator-config.cpp
@@ -482,14 +482,14 @@
 
   // If interestName has less than 4 name components,
   // it is definitely not a signed interest.
-  if (interest.getName().size() < signed_interest::MIN_LENGTH)
+  if (interest.getName().size() < command_interest::MIN_SIZE)
     return onValidationFailed(interest.shared_from_this(),
                               "Interest is not signed: " + interest.getName().toUri());
 
   try {
     const Name& interestName = interest.getName();
-    Signature signature(interestName[signed_interest::POS_SIG_INFO].blockFromValue(),
-                        interestName[signed_interest::POS_SIG_VALUE].blockFromValue());
+    Signature signature(interestName[command_interest::POS_SIG_INFO].blockFromValue(),
+                        interestName[command_interest::POS_SIG_VALUE].blockFromValue());
 
     if (!signature.hasKeyLocator())
       return onValidationFailed(interest.shared_from_this(), "No valid KeyLocator");
@@ -552,7 +552,7 @@
 
   try {
     interestTime =
-      time::fromUnixTimestamp(time::milliseconds(interestName.get(-signed_interest::MIN_LENGTH).toNumber()));
+      time::fromUnixTimestamp(time::milliseconds(interestName.at(command_interest::POS_TIMESTAMP).toNumber()));
   }
   catch (const tlv::Error& e) {
     return onValidationFailed(interest,