mgmt: fix construction of CertificateRequest in CommandAuthenticatorValidationPolicy
Just pass the KeyLocator name and let CertificateRequest deal
with constructing the Interest and setting CanBePrefix
Refs: #4582
Change-Id: I323d8ac5e16605bb978addc623e525b2536238bf
diff --git a/tests/daemon/mgmt/face-manager-update-face.t.cpp b/tests/daemon/mgmt/face-manager-update-face.t.cpp
index b380419..7b3859f 100644
--- a/tests/daemon/mgmt/face-manager-update-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-update-face.t.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,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -46,7 +46,7 @@
class FaceManagerUpdateFixture : public FaceManagerCommandFixture
{
public:
- ~FaceManagerUpdateFixture()
+ ~FaceManagerUpdateFixture() override
{
destroyFace();
}
@@ -110,7 +110,7 @@
if (isForOnDemandFace) {
auto face = target.faceTable.get(static_cast<FaceId>(this->faceId));
// to force creation of on-demand face
- face->sendInterest(*make_shared<Interest>("/hello/world"));
+ face->sendInterest(*makeInterest("/hello/world"));
}
});
diff --git a/tests/daemon/table/cs-fixture.hpp b/tests/daemon/table/cs-fixture.hpp
index 15bf89e..4ed5346 100644
--- a/tests/daemon/table/cs-fixture.hpp
+++ b/tests/daemon/table/cs-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -64,8 +64,7 @@
Interest&
startInterest(const Name& name)
{
- interest = make_shared<Interest>(name);
- interest->setCanBePrefix(false);
+ interest = makeInterest(name);
return *interest;
}
@@ -74,7 +73,7 @@
{
bool hasResult = false;
cs.find(*interest,
- [&] (const Interest& interest, const Data& data) {
+ [&] (const Interest&, const Data& data) {
hasResult = true;
const Block& content = data.getContent();
uint32_t found = 0;