Fix build with current ndn-cxx and update CI scripts

Change-Id: I766c4679456561d6d7335889b8b9974dc7b94aa6
diff --git a/src/daemon/rrset-factory.cpp b/src/daemon/rrset-factory.cpp
index d4a0d87..710a513 100644
--- a/src/daemon/rrset-factory.cpp
+++ b/src/daemon/rrset-factory.cpp
@@ -108,7 +108,7 @@
   try {
     CertHelper::getCertificate(m_keyChain, identity, certName);
     return true;
-  } catch (ndn::security::Pib::Error) {
+  } catch (const ndn::security::Pib::Error&) {
     return false;
   }
 }
diff --git a/src/validator/certificate-fetcher-ndns-appcert.cpp b/src/validator/certificate-fetcher-ndns-appcert.cpp
index 28f81b5..99e7f21 100644
--- a/src/validator/certificate-fetcher-ndns-appcert.cpp
+++ b/src/validator/certificate-fetcher-ndns-appcert.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Regents of the University of California.
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -44,10 +44,10 @@
                                    const shared_ptr<security::v2::ValidationState>& state,
                                    const ValidationContinuation& continueValidation)
 {
-  const Name& key = certRequest->m_interest.getName();
+  const Name& key = certRequest->interest.getName();
   auto query = make_shared<IterativeQueryController>(key,
                                                      label::APPCERT_RR_TYPE,
-                                                     certRequest->m_interest.getInterestLifetime(),
+                                                     certRequest->interest.getInterestLifetime(),
                                                      [=] (const Data& data, const Response& response) {
                                                        onQuerySuccessCallback(data, certRequest, state, continueValidation);
                                                      },
@@ -85,7 +85,7 @@
                                                const ValidationContinuation& continueValidation)
 {
   state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate due to " +
-        errMsg + " `" + certRequest->m_interest.getName().toUri() + "`"});
+               errMsg + " `" + certRequest->interest.getName().toUri() + "`"});
 }
 
 void
@@ -96,7 +96,7 @@
 {
   if (data.getContentType() == NDNS_NACK) {
     state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate: get a Nack "
-          "in query `" + certRequest->m_interest.getName().toUri() + "`"});
+                 "in query `" + certRequest->interest.getName().toUri() + "`"});
     return;
   }
 
@@ -118,8 +118,8 @@
                                                     const ValidationContinuation& continueValidation)
 {
   state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT,
-        "Cannot fetch certificate due to NDNS validation error :"
-        + err.getInfo() + " `" + certRequest->m_interest.getName().toUri() + "`"});
+               "Cannot fetch certificate due to NDNS validation error: " +
+               err.getInfo() + " `" + certRequest->interest.getName().toUri() + "`"});
 }
 
 } // namespace ndns
diff --git a/src/validator/certificate-fetcher-ndns-cert.cpp b/src/validator/certificate-fetcher-ndns-cert.cpp
index 4e0f01c..b5a0b9f 100644
--- a/src/validator/certificate-fetcher-ndns-cert.cpp
+++ b/src/validator/certificate-fetcher-ndns-cert.cpp
@@ -46,7 +46,7 @@
                                     const ValidationContinuation& continueValidation)
 {
   using IterativeQueryTag = SimpleTag<shared_ptr<IterativeQueryController>, 1086>;
-  const Name& key = certRequest->m_interest.getName();
+  const Name& key = certRequest->interest.getName();
   Name domain = calculateDomain(key);
   if (domain.size() == m_startComponentIndex) {
     // NS record does not exist, since the domain is actually globally routable
@@ -59,7 +59,7 @@
 
   auto query = std::make_shared<IterativeQueryController>(domain,
                                                           label::NS_RR_TYPE,
-                                                          certRequest->m_interest.getInterestLifetime(),
+                                                          certRequest->interest.getInterestLifetime(),
                                                           [=] (const Data& data, const Response& response) {
                                                             nsSuccessCallback(data, certRequest, state, continueValidation);
                                                           },
@@ -81,7 +81,7 @@
                                               const shared_ptr<security::v2::ValidationState>& state,
                                               const ValidationContinuation& continueValidation)
 {
-  Name interestName(certRequest->m_interest.getName());
+  Name interestName(certRequest->interest.getName());
   interestName.append(label::CERT_RR_TYPE);
   Interest interest(interestName);
 
@@ -118,9 +118,9 @@
                                            const ValidationContinuation& continueValidation)
 {
   NDNS_LOG_WARN("Cannot fetch link due to " +
-                errMsg + " `" + certRequest->m_interest.getName().toUri() + "`");
+                errMsg + " `" + certRequest->interest.getName().toUri() + "`");
 
-  Name interestName(certRequest->m_interest.getName());
+  Name interestName(certRequest->interest.getName());
   interestName.append(label::CERT_RR_TYPE);
   Interest interest(interestName);
   m_face.expressInterest(interest,
@@ -172,16 +172,16 @@
                                          const ValidationContinuation& continueValidation)
 {
   NDNS_LOG_DEBUG("NACK (" << nack.getReason() <<  ") while fetching certificate "
-                 << certRequest->m_interest.getName());
+                 << certRequest->interest.getName());
 
-  --certRequest->m_nRetriesLeft;
-  if (certRequest->m_nRetriesLeft >= 0) {
+  --certRequest->nRetriesLeft;
+  if (certRequest->nRetriesLeft >= 0) {
     // TODO implement delay for the the next fetch
     fetch(certRequest, state, continueValidation);
   }
   else {
     state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate after all "
-                 "retries `" + certRequest->m_interest.getName().toUri() + "`"});
+                 "retries `" + certRequest->interest.getName().toUri() + "`"});
   }
 }
 
@@ -190,16 +190,16 @@
                                             const shared_ptr<security::v2::ValidationState>& state,
                                             const ValidationContinuation& continueValidation)
 {
-  NDNS_LOG_DEBUG("Timeout while fetching certificate " << certRequest->m_interest.getName()
+  NDNS_LOG_DEBUG("Timeout while fetching certificate " << certRequest->interest.getName()
                  << ", retrying");
 
-  --certRequest->m_nRetriesLeft;
-  if (certRequest->m_nRetriesLeft >= 0) {
+  --certRequest->nRetriesLeft;
+  if (certRequest->nRetriesLeft >= 0) {
     fetch(certRequest, state, continueValidation);
   }
   else {
     state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate after all "
-                 "retries `" + certRequest->m_interest.getName().toUri() + "`"});
+                 "retries `" + certRequest->interest.getName().toUri() + "`"});
   }
 }