Do not compile ChronoSync support by default

ChronoSync dependency is now made optional
and is kept for testing purposes only.

Also change sig-type to ecdsa-sha256 in nlsr.conf
as ndn-cxx now has strict checking for it.

refs: #5147

Change-Id: I95c9fb844681ebf2c4e7bbb03cc7796a0795de83
diff --git a/src/conf-parameter.hpp b/src/conf-parameter.hpp
index c000c4b..57dd2c2 100644
--- a/src/conf-parameter.hpp
+++ b/src/conf-parameter.hpp
@@ -40,9 +40,11 @@
   LSA_REFRESH_TIME_MAX = 7200
 };
 
-enum {
-  SYNC_PROTOCOL_CHRONOSYNC = 0,
-  SYNC_PROTOCOL_PSYNC = 1
+enum SyncProtocol {
+#ifdef HAVE_CHRONOSYNC
+  SYNC_PROTOCOL_CHRONOSYNC,
+#endif
+  SYNC_PROTOCOL_PSYNC
 };
 
 enum {
@@ -211,18 +213,16 @@
     m_lsaRefreshTime = lrt;
   }
 
-  uint32_t
+  SyncProtocol
   getSyncProtocol() const
   {
     return m_syncProtocol;
   }
 
   void
-  setSyncProtocol(int32_t syncProtocol)
+  setSyncProtocol(SyncProtocol syncProtocol)
   {
-    if (syncProtocol == SYNC_PROTOCOL_CHRONOSYNC || syncProtocol == SYNC_PROTOCOL_PSYNC) {
-      m_syncProtocol = syncProtocol;
-    }
+    m_syncProtocol = syncProtocol;
   }
 
   uint32_t
@@ -527,7 +527,7 @@
 
   ndn::time::milliseconds m_syncInterestLifetime;
 
-  int32_t m_syncProtocol;
+  SyncProtocol m_syncProtocol;
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   static const uint64_t SYNC_VERSION;