diff --git a/src/security/v2/certificate-bundle-fetcher.cpp b/src/security/v2/certificate-bundle-fetcher.cpp
index 45a0c38..227a434 100644
--- a/src/security/v2/certificate-bundle-fetcher.cpp
+++ b/src/security/v2/certificate-bundle-fetcher.cpp
@@ -95,9 +95,10 @@
                                                   const ValidationContinuation& continueValidation)
 {
   Interest bundleInterest = Interest(bundleNamePrefix);
-  bundleInterest.setInterestLifetime(m_bundleInterestLifetime);
+  bundleInterest.setCanBePrefix(true);
   bundleInterest.setMustBeFresh(true);
   bundleInterest.setChildSelector(1);
+  bundleInterest.setInterestLifetime(m_bundleInterestLifetime);
 
   m_face.expressInterest(bundleInterest,
                          [=] (const Interest& interest, const Data& data) {
@@ -123,8 +124,9 @@
   }
 
   Interest bundleInterest(fullBundleName.getPrefix(-1).append(segmentNo));
-  bundleInterest.setInterestLifetime(m_bundleInterestLifetime);
+  bundleInterest.setCanBePrefix(false);
   bundleInterest.setMustBeFresh(false);
+  bundleInterest.setInterestLifetime(m_bundleInterestLifetime);
 
   m_face.expressInterest(bundleInterest,
                          [=] (const Interest& interest, const Data& data) {
diff --git a/src/security/v2/certificate-request.hpp b/src/security/v2/certificate-request.hpp
index c1d88dc..9bcb93b 100644
--- a/src/security/v2/certificate-request.hpp
+++ b/src/security/v2/certificate-request.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -46,6 +46,12 @@
   {
   }
 
+  explicit
+  CertificateRequest(const Name& name)
+    : CertificateRequest(Interest(name).setCanBePrefix(true))
+  {
+  }
+
 public:
   /// @brief the name for the requested data/certificate.
   Interest m_interest;
diff --git a/src/security/v2/validation-policy-config.cpp b/src/security/v2/validation-policy-config.cpp
index 2d82079..ff3f7bf 100644
--- a/src/security/v2/validation-policy-config.cpp
+++ b/src/security/v2/validation-policy-config.cpp
@@ -255,7 +255,7 @@
   for (const auto& rule : m_dataRules) {
     if (rule->match(tlv::Data, data.getName())) {
       if (rule->check(tlv::Data, data.getName(), klName, state)) {
-        return continueValidation(make_shared<CertificateRequest>(Interest(klName)), state);
+        return continueValidation(make_shared<CertificateRequest>(klName), state);
       }
       // rule->check calls state->fail(...) if the check fails
       return;
@@ -284,7 +284,7 @@
   for (const auto& rule : m_interestRules) {
     if (rule->match(tlv::Interest, interest.getName())) {
       if (rule->check(tlv::Interest, interest.getName(), klName, state)) {
-        return continueValidation(make_shared<CertificateRequest>(Interest(klName)), state);
+        return continueValidation(make_shared<CertificateRequest>(klName), state);
       }
       // rule->check calls state->fail(...) if the check fails
       return;
diff --git a/src/security/v2/validation-policy-simple-hierarchy.cpp b/src/security/v2/validation-policy-simple-hierarchy.cpp
index 0ad6128..e83c9bc 100644
--- a/src/security/v2/validation-policy-simple-hierarchy.cpp
+++ b/src/security/v2/validation-policy-simple-hierarchy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -35,7 +35,7 @@
   }
 
   if (klName.getPrefix(-2).isPrefixOf(data.getName())) {
-    continueValidation(make_shared<CertificateRequest>(Interest(klName)), state);
+    continueValidation(make_shared<CertificateRequest>(klName), state);
   }
   else {
     state->fail({ValidationError::Code::INVALID_KEY_LOCATOR, "Data signing policy violation for " +
@@ -53,7 +53,7 @@
   }
 
   if (klName.getPrefix(-2).isPrefixOf(interest.getName())) {
-    continueValidation(make_shared<CertificateRequest>(Interest(klName)), state);
+    continueValidation(make_shared<CertificateRequest>(klName), state);
   }
   else {
     state->fail({ValidationError::Code::INVALID_KEY_LOCATOR, "Interest signing policy violation for " +
