build: require boost >= 1.71.0
Refs: #5276
Change-Id: Ifc719cf5e4b8704e0408cab1f9ab849006061dfc
diff --git a/tests/unit-tests/crypto-helpers.t.cpp b/tests/unit-tests/crypto-helpers.t.cpp
index ff645dd..f8ec1a4 100644
--- a/tests/unit-tests/crypto-helpers.t.cpp
+++ b/tests/unit-tests/crypto-helpers.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2022, Regents of the University of California.
+ * Copyright (c) 2017-2023, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -22,6 +22,8 @@
#include "tests/boost-test.hpp"
+#include <boost/endian/conversion.hpp>
+
namespace ndncert::tests {
BOOST_AUTO_TEST_SUITE(TestCryptoHelpers)
@@ -271,6 +273,8 @@
BOOST_AUTO_TEST_CASE(AesIV)
{
+ namespace be = boost::endian;
+
const uint8_t key[] = {0xbc, 0x22, 0xf3, 0xf0, 0x5c, 0xc4, 0x0d, 0xb9,
0x31, 0x1e, 0x41, 0x92, 0x96, 0x6f, 0xee, 0x92};
const std::string plaintext = "alongstringalongstringalongstringalongstringalongstringalongstringalongstringalongstring";
@@ -282,8 +286,8 @@
auto ivBlock = block.get(tlv::InitializationVector);
ndn::Buffer ivBuf(ivBlock.value(), ivBlock.value_size());
BOOST_CHECK_EQUAL(ivBuf.size(), 12);
- BOOST_CHECK_EQUAL(loadBigU32(&encryptionIv[8]), 6);
- BOOST_CHECK_EQUAL(loadBigU32(&ivBuf[8]), 0);
+ BOOST_CHECK_EQUAL((be::endian_load<uint32_t, 4, be::order::big>(&encryptionIv[8])), 6);
+ BOOST_CHECK_EQUAL((be::endian_load<uint32_t, 4, be::order::big>(&ivBuf[8])), 0);
block = encodeBlockWithAesGcm128(ndn::tlv::ApplicationParameters, key, (uint8_t*)plaintext.c_str(), plaintext.size(),
(uint8_t*)associatedData.c_str(), associatedData.size(), encryptionIv);