security: sign and verify new signed Interest format

refs #4804

Change-Id: Ib819edb977fa06c670b04185a0d730203c7d7fdb
diff --git a/tests/unit/security/certificate-fetcher-offline.t.cpp b/tests/unit/security/certificate-fetcher-offline.t.cpp
index 0a11d24..e3ca483 100644
--- a/tests/unit/security/certificate-fetcher-offline.t.cpp
+++ b/tests/unit/security/certificate-fetcher-offline.t.cpp
@@ -25,6 +25,8 @@
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
+#include <boost/scope_exit.hpp>
+
 namespace ndn {
 namespace security {
 inline namespace v2 {
@@ -51,6 +53,13 @@
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Validate, Packet, Packets)
 {
+  // Can't set CanBePrefix on Interests in this test case because of template
+  // TODO: Remove in #4582
+  BOOST_SCOPE_EXIT(void) {
+    Interest::s_errorIfCanBePrefixUnset = true;
+  } BOOST_SCOPE_EXIT_END
+  Interest::s_errorIfCanBePrefixUnset = false;
+
   Packet unsignedPacket("/Security/ValidatorFixture/Sub1/Packet");
 
   Packet packet = unsignedPacket;