From af4e4e735873a37a5bf1b7dbe9eed5014283900b Mon Sep 17 00:00:00 2001 From: Davide Pesavento Date: Fri, 26 Jan 2024 14:30:11 -0500 Subject: [PATCH] Fix build with latest ndn-cxx Change-Id: I016e054fcb80ef30c27dbf8d77085c38a748dfe1 --- src/access-manager.cpp | 6 +++--- src/encryptor.cpp | 6 +++--- tests/clock-fixture.cpp | 6 +++--- tests/clock-fixture.hpp | 6 +++--- tests/unit/decryptor.t.cpp | 6 +++--- tests/unit/encrypted-content.t.cpp | 4 ++-- tests/unit/encryptor.t.cpp | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/access-manager.cpp b/src/access-manager.cpp index 70ad8be..144034d 100644 --- a/src/access-manager.cpp +++ b/src/access-manager.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* - * Copyright (c) 2014-2022, Regents of the University of California + * Copyright (c) 2014-2024, Regents of the University of California * * NAC library is free software: you can redistribute it and/or modify it under the * 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, auto kekPrefix = Name(m_nacKey.getIdentity()).append(KEK); - auto kek = make_shared(m_nacKey.getDefaultCertificate()); + auto kek = std::make_shared(m_nacKey.getDefaultCertificate()); kek->setName(Name(kekPrefix).append(nacKeyId)); kek->setFreshnessPeriod(DEFAULT_KEK_FRESHNESS_PERIOD); m_keyChain.sign(*kek, signingByIdentity(m_identity)); @@ -106,7 +106,7 @@ AccessManager::addMember(const Certificate& memberCert) content.setPayload(kdkData->wireEncode()); content.setPayloadKey(memberKey.encrypt({secret, secretLength})); - auto kdk = make_shared(kdkName); + auto kdk = std::make_shared(kdkName); kdk->setContent(content.wireEncode()); // FreshnessPeriod can serve as a soft access control for revoking access kdk->setFreshnessPeriod(DEFAULT_KDK_FRESHNESS_PERIOD); diff --git a/src/encryptor.cpp b/src/encryptor.cpp index b41af4c..31acda5 100644 --- a/src/encryptor.cpp +++ b/src/encryptor.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* - * Copyright (c) 2014-2023, Regents of the University of California + * Copyright (c) 2014-2024, Regents of the University of California * * NAC library is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software @@ -117,7 +117,7 @@ EncryptedContent Encryptor::encrypt(span data) { // Generate IV - auto iv = make_shared(AES_IV_SIZE); + auto iv = std::make_shared(AES_IV_SIZE); random::generateSecureBytes(*iv); OBufferStream os; @@ -192,7 +192,7 @@ Encryptor::makeAndPublishCkData(const ErrorCallback& onFailure) EncryptedContent content; content.setPayload(kek.encrypt(m_ckBits)); - auto ckData = make_shared(Name(m_ckName).append(ENCRYPTED_BY).append(m_kek->getName())); + auto ckData = std::make_shared(Name(m_ckName).append(ENCRYPTED_BY).append(m_kek->getName())); ckData->setContent(content.wireEncode()); // FreshnessPeriod can serve as a soft access control for revoking access ckData->setFreshnessPeriod(DEFAULT_CK_FRESHNESS_PERIOD); diff --git a/tests/clock-fixture.cpp b/tests/clock-fixture.cpp index abad20c..5ad70a6 100644 --- a/tests/clock-fixture.cpp +++ b/tests/clock-fixture.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* - * Copyright (c) 2014-2022, Regents of the University of California + * Copyright (c) 2014-2024, Regents of the University of California * * NAC library is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software @@ -22,8 +22,8 @@ namespace ndn::nac::tests { ClockFixture::ClockFixture() - : m_steadyClock(make_shared()) - , m_systemClock(make_shared()) + : m_steadyClock(std::make_shared()) + , m_systemClock(std::make_shared()) { time::setCustomClocks(m_steadyClock, m_systemClock); } diff --git a/tests/clock-fixture.hpp b/tests/clock-fixture.hpp index b6b40b1..3e280b5 100644 --- a/tests/clock-fixture.hpp +++ b/tests/clock-fixture.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* - * Copyright (c) 2014-2022, Regents of the University of California + * Copyright (c) 2014-2024, Regents of the University of California * * NAC library is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software @@ -73,8 +73,8 @@ class ClockFixture } protected: - shared_ptr m_steadyClock; - shared_ptr m_systemClock; + std::shared_ptr m_steadyClock; + std::shared_ptr m_systemClock; }; } // namespace ndn::nac::tests diff --git a/tests/unit/decryptor.t.cpp b/tests/unit/decryptor.t.cpp index 14ebedf..8766907 100644 --- a/tests/unit/decryptor.t.cpp +++ b/tests/unit/decryptor.t.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* - * Copyright (c) 2014-2023, Regents of the University of California + * Copyright (c) 2014-2024, Regents of the University of California * * NAC library is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software @@ -41,10 +41,10 @@ class DecryptorStaticDataEnvironment : public IoKeyChainFixture { StaticData data; for (const auto& block : data.managerPackets) { - m_ims.insert(*make_shared(block)); + m_ims.insert(*std::make_shared(block)); } for (const auto& block : data.encryptorPackets) { - m_ims.insert(*make_shared(block)); + m_ims.insert(*std::make_shared(block)); } auto serveFromIms = [this] (const Name&, const Interest& interest) { diff --git a/tests/unit/encrypted-content.t.cpp b/tests/unit/encrypted-content.t.cpp index 9c1f631..e14da41 100644 --- a/tests/unit/encrypted-content.t.cpp +++ b/tests/unit/encrypted-content.t.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* - * Copyright (c) 2014-2023, Regents of the University of California + * Copyright (c) 2014-2024, Regents of the University of California * * This file is part of NAC (Name-Based Access Control for NDN). * See AUTHORS.md for complete list of NAC authors and contributors. @@ -35,7 +35,7 @@ class EncryptedContentFixture public: EncryptedContent content; Block randomBlock = "01 03 000000"_block; - ConstBufferPtr randomBuffer = make_shared(10); + ConstBufferPtr randomBuffer = std::make_shared(10); }; BOOST_FIXTURE_TEST_SUITE(TestEncryptedContent, EncryptedContentFixture) diff --git a/tests/unit/encryptor.t.cpp b/tests/unit/encryptor.t.cpp index 4a2e0a9..5c486f7 100644 --- a/tests/unit/encryptor.t.cpp +++ b/tests/unit/encryptor.t.cpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* - * Copyright (c) 2014-2023, Regents of the University of California + * Copyright (c) 2014-2024, Regents of the University of California * * NAC library is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software @@ -59,7 +59,7 @@ class EncryptorStaticDataEnvironment : public IoKeyChainFixture { StaticData data; for (const auto& block : data.managerPackets) { - m_ims.insert(*make_shared(block)); + m_ims.insert(*std::make_shared(block)); } advanceClocks(1_ms, 10); }