Skip to content

Commit af4e4e7

Browse files
committed
Fix build with latest ndn-cxx
Change-Id: I016e054fcb80ef30c27dbf8d77085c38a748dfe1
1 parent fad1264 commit af4e4e7

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

src/access-manager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
/*
3-
* Copyright (c) 2014-2022, Regents of the University of California
3+
* Copyright (c) 2014-2024, Regents of the University of California
44
*
55
* NAC library is free software: you can redistribute it and/or modify it under the
66
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -46,7 +46,7 @@ AccessManager::AccessManager(const Identity& identity, const Name& dataset,
4646

4747
auto kekPrefix = Name(m_nacKey.getIdentity()).append(KEK);
4848

49-
auto kek = make_shared<Data>(m_nacKey.getDefaultCertificate());
49+
auto kek = std::make_shared<Data>(m_nacKey.getDefaultCertificate());
5050
kek->setName(Name(kekPrefix).append(nacKeyId));
5151
kek->setFreshnessPeriod(DEFAULT_KEK_FRESHNESS_PERIOD);
5252
m_keyChain.sign(*kek, signingByIdentity(m_identity));
@@ -106,7 +106,7 @@ AccessManager::addMember(const Certificate& memberCert)
106106
content.setPayload(kdkData->wireEncode());
107107
content.setPayloadKey(memberKey.encrypt({secret, secretLength}));
108108

109-
auto kdk = make_shared<Data>(kdkName);
109+
auto kdk = std::make_shared<Data>(kdkName);
110110
kdk->setContent(content.wireEncode());
111111
// FreshnessPeriod can serve as a soft access control for revoking access
112112
kdk->setFreshnessPeriod(DEFAULT_KDK_FRESHNESS_PERIOD);

src/encryptor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
/*
3-
* Copyright (c) 2014-2023, Regents of the University of California
3+
* Copyright (c) 2014-2024, Regents of the University of California
44
*
55
* NAC library is free software: you can redistribute it and/or modify it under the
66
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -117,7 +117,7 @@ EncryptedContent
117117
Encryptor::encrypt(span<const uint8_t> data)
118118
{
119119
// Generate IV
120-
auto iv = make_shared<Buffer>(AES_IV_SIZE);
120+
auto iv = std::make_shared<Buffer>(AES_IV_SIZE);
121121
random::generateSecureBytes(*iv);
122122

123123
OBufferStream os;
@@ -192,7 +192,7 @@ Encryptor::makeAndPublishCkData(const ErrorCallback& onFailure)
192192
EncryptedContent content;
193193
content.setPayload(kek.encrypt(m_ckBits));
194194

195-
auto ckData = make_shared<Data>(Name(m_ckName).append(ENCRYPTED_BY).append(m_kek->getName()));
195+
auto ckData = std::make_shared<Data>(Name(m_ckName).append(ENCRYPTED_BY).append(m_kek->getName()));
196196
ckData->setContent(content.wireEncode());
197197
// FreshnessPeriod can serve as a soft access control for revoking access
198198
ckData->setFreshnessPeriod(DEFAULT_CK_FRESHNESS_PERIOD);

tests/clock-fixture.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
/*
3-
* Copyright (c) 2014-2022, Regents of the University of California
3+
* Copyright (c) 2014-2024, Regents of the University of California
44
*
55
* NAC library is free software: you can redistribute it and/or modify it under the
66
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -22,8 +22,8 @@
2222
namespace ndn::nac::tests {
2323

2424
ClockFixture::ClockFixture()
25-
: m_steadyClock(make_shared<time::UnitTestSteadyClock>())
26-
, m_systemClock(make_shared<time::UnitTestSystemClock>())
25+
: m_steadyClock(std::make_shared<time::UnitTestSteadyClock>())
26+
, m_systemClock(std::make_shared<time::UnitTestSystemClock>())
2727
{
2828
time::setCustomClocks(m_steadyClock, m_systemClock);
2929
}

tests/clock-fixture.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
/*
3-
* Copyright (c) 2014-2022, Regents of the University of California
3+
* Copyright (c) 2014-2024, Regents of the University of California
44
*
55
* NAC library is free software: you can redistribute it and/or modify it under the
66
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -73,8 +73,8 @@ class ClockFixture
7373
}
7474

7575
protected:
76-
shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
77-
shared_ptr<time::UnitTestSystemClock> m_systemClock;
76+
std::shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
77+
std::shared_ptr<time::UnitTestSystemClock> m_systemClock;
7878
};
7979

8080
} // namespace ndn::nac::tests

tests/unit/decryptor.t.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
/*
3-
* Copyright (c) 2014-2023, Regents of the University of California
3+
* Copyright (c) 2014-2024, Regents of the University of California
44
*
55
* NAC library is free software: you can redistribute it and/or modify it under the
66
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -41,10 +41,10 @@ class DecryptorStaticDataEnvironment : public IoKeyChainFixture
4141
{
4242
StaticData data;
4343
for (const auto& block : data.managerPackets) {
44-
m_ims.insert(*make_shared<Data>(block));
44+
m_ims.insert(*std::make_shared<Data>(block));
4545
}
4646
for (const auto& block : data.encryptorPackets) {
47-
m_ims.insert(*make_shared<Data>(block));
47+
m_ims.insert(*std::make_shared<Data>(block));
4848
}
4949

5050
auto serveFromIms = [this] (const Name&, const Interest& interest) {

tests/unit/encrypted-content.t.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
/*
3-
* Copyright (c) 2014-2023, Regents of the University of California
3+
* Copyright (c) 2014-2024, Regents of the University of California
44
*
55
* This file is part of NAC (Name-Based Access Control for NDN).
66
* See AUTHORS.md for complete list of NAC authors and contributors.
@@ -35,7 +35,7 @@ class EncryptedContentFixture
3535
public:
3636
EncryptedContent content;
3737
Block randomBlock = "01 03 000000"_block;
38-
ConstBufferPtr randomBuffer = make_shared<const Buffer>(10);
38+
ConstBufferPtr randomBuffer = std::make_shared<const Buffer>(10);
3939
};
4040

4141
BOOST_FIXTURE_TEST_SUITE(TestEncryptedContent, EncryptedContentFixture)

tests/unit/encryptor.t.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
/*
3-
* Copyright (c) 2014-2023, Regents of the University of California
3+
* Copyright (c) 2014-2024, Regents of the University of California
44
*
55
* NAC library is free software: you can redistribute it and/or modify it under the
66
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -59,7 +59,7 @@ class EncryptorStaticDataEnvironment : public IoKeyChainFixture
5959
{
6060
StaticData data;
6161
for (const auto& block : data.managerPackets) {
62-
m_ims.insert(*make_shared<Data>(block));
62+
m_ims.insert(*std::make_shared<Data>(block));
6363
}
6464
advanceClocks(1_ms, 10);
6565
}

0 commit comments

Comments
 (0)