explicitly set CanBePrefix where needed

refs #4582

Change-Id: If79d8042502c4370197ca2f04c9acebb97261390
diff --git a/src/clients/query.cpp b/src/clients/query.cpp
index ab70fff..9bc5c60 100644
--- a/src/clients/query.cpp
+++ b/src/clients/query.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-2021, 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.
@@ -72,8 +72,8 @@
       .append(this->m_rrLabel)
       .append(this->m_rrType);
 
-  Interest interest;
-  interest.setName(name);
+  Interest interest(name);
+  interest.setCanBePrefix(true);
   interest.setInterestLifetime(m_interestLifetime);
   if (!m_delegationList.empty()) {
     interest.setForwardingHint(m_delegationList);
diff --git a/src/validator/certificate-fetcher-ndns-cert.cpp b/src/validator/certificate-fetcher-ndns-cert.cpp
index 34c0774..a29afe0 100644
--- a/src/validator/certificate-fetcher-ndns-cert.cpp
+++ b/src/validator/certificate-fetcher-ndns-cert.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020, Regents of the University of California.
+ * Copyright (c) 2014-2021, 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.
@@ -81,6 +81,7 @@
   Name interestName(certRequest->interest.getName());
   interestName.append(label::CERT_RR_TYPE);
   Interest interest(interestName);
+  interest.setCanBePrefix(true);
 
   if (data.getContentType() == NDNS_LINK) {
     Link link(data.wireEncode());
@@ -120,6 +121,7 @@
   Name interestName(certRequest->interest.getName());
   interestName.append(label::CERT_RR_TYPE);
   Interest interest(interestName);
+  interest.setCanBePrefix(true);
   m_face.expressInterest(interest,
                          [=] (const Interest&, const Data& data) {
                            dataCallback(data, certRequest, state, continueValidation);